summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/mvdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
index c4fa980bf2..f1f73e51f9 100644
--- a/libavformat/mvdec.c
+++ b/libavformat/mvdec.c
@@ -269,6 +269,8 @@ static void read_index(AVIOContext *pb, AVStream *st)
uint32_t pos = avio_rb32(pb);
uint32_t size = avio_rb32(pb);
avio_skip(pb, 8);
+ if (avio_feof(pb))
+ return ;
av_add_index_entry(st, pos, timestamp, size, 0, AVINDEX_KEYFRAME);
if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
timestamp += size / (st->codecpar->channels * 2LL);