summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-30 20:28:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-30 20:34:55 +0100
commitbace181b48852ac668599a61d68dbc6eeb96c2e3 (patch)
treecbd3e4d37aafbe0b78ea30ede53bb337d750c20e /libavformat/flvdec.c
parentba10207bbe5ebd97b5afc3f19baf4a1ad8f974d5 (diff)
flvdec: Add comment about the 5 second threshold
Idea-by: Reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c2
1 files changed, 1 insertions, 1 deletions
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);