diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 15:08:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-08 00:25:02 +0100 |
commit | 898ab02557b0f9a3d6245b72c3d454f1417f7e3f (patch) | |
tree | 4661bba2989148f3fe54336b5fcff8fa422392c0 | |
parent | 69aa3d5b88ecb1e57d1d1f508f1f141514bc7526 (diff) | |
download | ffmpeg-898ab02557b0f9a3d6245b72c3d454f1417f7e3f.tar.gz |
avformat/avidec: Dont assert the existence of an index for video streams.
Its possible in various rare cases that an index cannot be created or allocated.
Fixes assertion failure
Fixes: signal_sigabrt_7ffff7126425_7712_pokem.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7865759409b27089b444bc029b2b76b06161b2cf)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 1a40e94c82..81f4b18427 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1306,10 +1306,9 @@ FF_ENABLE_DEPRECATION_WARNINGS size); pkt->stream_index = avi->stream_index; - if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->index_entries) { AVIndexEntry *e; int index; - av_assert0(st->index_entries); index = av_index_search_timestamp(st, ast->frame_offset, 0); e = &st->index_entries[index]; |