mirror of https://git.ffmpeg.org/ffmpeg.git
flvdec: Add comment about the 5 second threshold
Idea-by: Reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ba10207bbe
commit
bace181b48
|
@ -196,7 +196,7 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream
|
||||||
size1 = avio_rb24(ioc);
|
size1 = avio_rb24(ioc);
|
||||||
dts = avio_rb24(ioc);
|
dts = avio_rb24(ioc);
|
||||||
dts |= avio_r8(ioc) << 24;
|
dts |= avio_r8(ioc) << 24;
|
||||||
if (size0 > filepositions[1] || FFABS(dts - times[1]*1000)>5000)
|
if (size0 > filepositions[1] || FFABS(dts - times[1]*1000)>5000/*arbitraray threshold to detect invalid index*/)
|
||||||
goto invalid;
|
goto invalid;
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue