[FFmpeg-devel] [PATCH 1/2] add support for generic seeking by?reading timestamps in nuv
Reimar.Doeffinger at gmx.de
Mon Sep 12 18:33:45 CEST 2011
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
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.
More information about the ffmpeg-devel