flvdec: Fix invalid pointer deferences when parsing index
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2b4e49d428)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Reinhard Tartler
parent
8475df8158
commit
74f4c1358c
@@ -185,8 +185,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeslen == fileposlen)
|
if (!ret && timeslen == fileposlen)
|
||||||
for(i = 0; i < arraylen; i++)
|
for (i = 0; i < fileposlen; 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
|
||||||
av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");
|
av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user