[FFmpeg-devel] [PATCH] Base parser frame_offset on correct packet pos.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Apr 24 18:19:22 CEST 2011


On Sun, Apr 24, 2011 at 02:16:14PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 10, 2011 at 01:25:20AM +0200, Reimar Döffinger wrote:
> > The current code only works if the next buffer starts directly
> > after the previous one in the file. For formats with some sort
> > of framing that is not necessarily the case.
> > Without this change, GENERIC_INDEX with needs_parsing and framing
> > that causes the stream to be non-consecutive results in a broken
> > index being generated.
> 
> 
> > This is probably also a bug in the generic index code, it probably
> > should ignore the parser output and instead always seek to some
> > pkt->pos, or at the very least only use it when full parsing is requested.
> 
> yes with framing and non consecutive packets the only thing that makes
> sense generically is using pkt->pos
> 
> 
> the various offsets are IIRC all supposed to be ofsets within a stream
> not within a file
> I do not know what effect it would have to redefine them to be offsets
> within a file.

So is then the other approach (patch just sent) the way to go?
Currently generic index support is seriously broken, it basically
is impossible to use it for any container that needs parsing e.g.
to generate correct time-stamps.
In particular, a patch to add generic index support to the ea parser
depends on sucha change.


More information about the ffmpeg-devel mailing list