flv: Skip invalid index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent 33feba3abf
commit 4b7ef5a1e6
  1. 2
      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

Loading…
Cancel
Save