aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mlvdec.c
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-22 02:37:08 -0500
committerSteve Kondik <steve@cyngn.com>2015-12-22 02:37:08 -0500
commitbc1e061c245cfb1d8a8fdd52cfa394bf117f770a (patch)
tree05f33f51bab749a67c82c67ae34a4f83edeb903a /libavformat/mlvdec.c
parenta4a2a44d6836e2f58d9112bdb384e4f2cfac905d (diff)
parent79f407b79a825c3123aff65cef64b383eca5a95e (diff)
downloadandroid_external_ffmpeg-bc1e061c245cfb1d8a8fdd52cfa394bf117f770a.tar.gz
android_external_ffmpeg-bc1e061c245cfb1d8a8fdd52cfa394bf117f770a.tar.bz2
android_external_ffmpeg-bc1e061c245cfb1d8a8fdd52cfa394bf117f770a.zip
Merge branch 'release/2.8' of https://github.com/FFmpeg/FFmpeg into cm-13.0
Diffstat (limited to 'libavformat/mlvdec.c')
-rw-r--r--libavformat/mlvdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 48a429eb23..4b3bdc1eca 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -365,6 +365,11 @@ static int read_header(AVFormatContext *avctx)
if (ast)
ast->duration = ast->nb_index_entries;
+ if ((vst && !vst->nb_index_entries) || (ast && !ast->nb_index_entries)) {
+ av_log(avctx, AV_LOG_ERROR, "no index entries found\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (vst && ast)
avio_seek(pb, FFMIN(vst->index_entries[0].pos, ast->index_entries[0].pos), SEEK_SET);
else if (vst)