History

avformat/subfile: Assert that whence is a known case

This may help CID1452449 Uninitialized scalar variable

Michael Niedermayer committed 2 years ago

Commit 426d8c81 parent 2a0a7d91 file · +3 −0Browse files

Unified · Split

libavformat/subfile.c+3−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21+#include "libavutil/avassert.h"
2122 #include "libavutil/avstring.h"
2223 #include "libavutil/opt.h"
2324 #include "url.h"
@@ -135,6 +136,8 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence) · 111 unmodified lines
135136 case SEEK_END:
136137 new_pos = end + pos;
137138 break;
139+ default:
140+ av_assert0(0);
138141 }
139142 if (new_pos < c->start)
140143 return AVERROR(EINVAL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t