[FFmpeg-devel] [PATCH 1/2] add support for generic seeking by?reading timestamps in nuv

Michael Niedermayer michaelni at gmx.at
Mon Sep 12 19:04:20 CEST 2011


On Mon, Sep 12, 2011 at 06:33:45PM +0200, Reimar Döffinger wrote:
> On Mon, Sep 12, 2011 at 06:16:34PM +0200, Michael Niedermayer wrote:
> > On Mon, Sep 12, 2011 at 05:56:51PM +0200, Reimar Döffinger wrote:
> > > On Mon, Sep 12, 2011 at 02:12:48PM +0000, Joakim Plate wrote:
> > > > Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> > > > 
> > > > > 
> > > > > Not a proper review yet, but your approach is inefficient.
> > > > > You should not scan bytewise, but instead always read a 32 bit block and look 
> > > > for jjjj - once you have a match,
> > > > > check for a full RTjjjjjjjj...
> > > > > I thought I had seen this implemented somewhere (in MPlayer? Or maybe just one 
> > > > of the things I never finished.
> > > > 
> > > > 
> > > > This patch has done several round already. Seems the last version in that thread 
> > > > is not what we still had applied locally. You intended to look at it seems:
> > > > 
> > > > http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/68778/focus=68794
> > > 
> > > Sorry for it going under.
> > > But I think the idea I had back then was to do this:
> > > Scan for jjjj using avio_rn32() or such.
> > > If found:
> > > - store current position
> > 
> > > - seek back 5
> > 
> > keep last variable, as that seekback can fail on non seekable input
> > depending on buffer state
> 
> First, you'd have to keep 2.

> Second, what would be the point/when would you do read_timestamp on
> non-seekable input?

its a resync function, it might come in handy to support damaged
streams
either way this is a minor thing, iam happy with any improvment


> Third, if that is the case it might make sense to investigate changing
> the buffering that at least a bit of seeking back always works.

of course

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20110912/9c06ae5f/attachment.asc>


More information about the ffmpeg-devel mailing list