Commit 4b7ef5a1 authored by Michael Niedermayer's avatar Michael Niedermayer

flv: Skip invalid index

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 33feba3a
...@@ -196,7 +196,7 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream ...@@ -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++) for(i = 0; i < timeslen; i++)
av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME); av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
} else } else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment