[FFmpeg-devel] [PATCH 1/3] flvdec: Check index for being valid Fixes seeking in Enigma_Principles_of_Lust.flv
Michael Niedermayer
michaelni at gmx.at
Fri Dec 30 04:28:56 CET 2011
On Thu, Dec 29, 2011 at 10:19:57PM -0500, Derek Buitenhuis wrote:
> 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.
applied, thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111230/c5e7d407/attachment.asc>
More information about the ffmpeg-devel
mailing list