[FFmpeg-cvslog] avformat/avidec: Dont assert the existence of an index for video streams.

Michael Niedermayer git at videolan.org
Fri Nov 22 17:08:39 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 22 15:08:04 2013 +0100| [7865759409b27089b444bc029b2b76b06161b2cf] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7865759409b27089b444bc029b2b76b06161b2cf
---

 libavformat/avidec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 6debfbe..be9715c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1310,10 +1310,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];



More information about the ffmpeg-cvslog mailing list