diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 17:11:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-08 17:39:39 +0100 |
commit | 4b7ef5a1e6fa622fc85741c9c1ca11c798cda9cb (patch) | |
tree | c45986d4a442206c71ce6824603f5bc63dd4d967 | |
parent | 33feba3abfe64c3b020f5738ea06a951b5906655 (diff) | |
download | ffmpeg-4b7ef5a1e6fa622fc85741c9c1ca11c798cda9cb.tar.gz |
flv: Skip invalid index
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/flvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index e2f7f9c16d..954deeb583 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -196,7 +196,7 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream } } - if (timeslen == fileposlen) { + if (timeslen == fileposlen && fileposlen && max_pos <= filepositions[0]) { for(i = 0; i < timeslen; i++) av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME); } else |