From bace181b48852ac668599a61d68dbc6eeb96c2e3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 30 Dec 2011 20:28:47 +0100 Subject: flvdec: Add comment about the 5 second threshold Idea-by: Reimar Signed-off-by: Michael Niedermayer --- libavformat/flvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/flvdec.c') diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 5aed3eda76..2ebef63fec 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -196,7 +196,7 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream size1 = avio_rb24(ioc); dts = avio_rb24(ioc); 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; for(i = 0; i < timeslen; i++) av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME); -- cgit v1.2.3