Commit 2b4e49d4 authored by Laurent Aimar's avatar Laurent Aimar Committed by Martin Storsjö

flvdec: Fix invalid pointer deferences when parsing index

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 87a74f47
......@@ -196,8 +196,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
}
}
if (timeslen == fileposlen)
for(i = 0; i < arraylen; i++)
if (!ret && timeslen == fileposlen)
for (i = 0; i < fileposlen; i++)
av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME);
else
av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");
......
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