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

Michael Niedermayer michaelni at gmx.at
Sun Apr 24 23:41:38 CEST 2011


On Sun, Apr 24, 2011 at 06:19:22PM +0200, Reimar Döffinger wrote:
> 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.

IMHO we need 2 things
1.  the container packet position, so that many
stream packets (even of diffenert streams) can have the same position
current parsers should be able to reorder this correctly as pos i think
and we can seek to this, theres no reason why we could seek to random
positions between the packets. It works for raw streams but not for
others

2. some means to skip until the wanted poistion, this could just be
   the wanted timestamp or some skip bytes value.



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

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- 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/20110424/e339b450/attachment.asc>


More information about the ffmpeg-devel mailing list