[FFmpeg-devel] [PATCH 1/3] flvdec: Check index for being valid Fixes seeking in Enigma_Principles_of_Lust.flv

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Dec 30 10:29:19 CET 2011


On Thu, Dec 29, 2011 at 10:19:57PM -0500, Derek Buitenhuis wrote:
> >>> +        if (size0>  filepositions[1] || FFABS(dts - times[1]*1000)>5000)
> >>
> >> Where does this magic number (5000) come from? Again, sorry if I missed
> >> this.
> >
> > just a random value (5 seconds) to avoid discarding an index due to
> > the timestamps being a bit off.
> > one surely can discuss the value for hours id say though 5sec is as
> > good as any until theres a testcase that needs something else.
> 
> No need to bikeshed the value, I suppose.

No, but please don't hesitate to document such arbitrary values in the
code.
This makes it vastly easier for the next person having an issue with it
when they know whether the value was chosen specifically like this and
they can't change it or whether they can just fiddle with it to make
their special case work.


More information about the ffmpeg-devel mailing list