flv: Skip invalid index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-08 17:11:02 +01:00
parent 33feba3abf
commit 4b7ef5a1e6
1 changed files with 1 additions and 1 deletions

View File

@ -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