Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-22 18:08:04 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-11-22 20:02:00 +0400
commit7865759409b27089b444bc029b2b76b06161b2cf (patch)
tree6a6f4d3d44b9e5eebb728bc78ab028ec0b41c43a /libavformat/avidec.c
parentd20241c9b1f370a6b8db6bc88b5e0c50af14727e (diff)
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>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 6debfbe760..be9715c4f7 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];