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

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Dec 30 04:19:57 CET 2011


On 29/12/2011 10:05 PM, Michael Niedermayer wrote:
>>> -    if (timeslen == fileposlen&&  fileposlen&&  max_pos<= filepositions[0]) {
>>> +    if (timeslen == fileposlen&&  fileposlen>1&&  max_pos<= filepositions[0]) {
>>
>> I'm not sure where the >1 comes in? Wouldn't this change behavior
>> on previously working files?
>
> yes and no, it would only affect files with just one keyframe. And
> the "runtime" indexing would add that in an instant without this code.
> it could be done a bit differently but then indexes with just one
> keyframe would not be checked

Hmm. I don't see a "nice" solution for this, I guess. Oh well.

>>> +        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.

OK.

- Derek


More information about the ffmpeg-devel mailing list