On Tue, 2012-07-10 at 17:44 +0200, Luca Barbato wrote:
> On 07/10/2012 04:19 PM, Tomas Härdin wrote:
> > The backward parsing is due to PartitionPack not having any offset to
> > the *next* partition - only the previous one (PreviousPartition). Since
> > we don't want to parse the essence and in general can't skip over it (if
> > it's frame wrapped, like OP1a), then we need to skip to FooterPartition,
> > parse it and its metadata, then seek to its PreviousPartition, parse it
> > etc. until we end up where we were when we stopped parsing forward.
> 
> Brr....
> 
> > There's *supposed* to be a Random Index Pack at the very end of the
> > file, but not all files have it. All files I've seen set
> > PreviousPartition and FooterPartition correctly though. Hence this
> > solution.
> > 
> > A hypothetical file could have a RIP and no FooterPartition values set
> > (like if muxed to a pipe), in which case you could fill in the
> > PreviousPartition values from the RIP and use the current parsing code
> > as-is. However, IIRC FooterPartition *must* be set so this point may be
> > moot.
> > 
> > Feel free to read SMPTE 377m if you're curious about the format, and the
> > two dozen or so related specifications (S377m is very vague about how
> > things like essence are *actually* written).
> 
> Feels like rtp made even more hellish.
> 
> If next morning I wake up early again I might give a stab at the encoder
> side as well.

I'll just note that I don't know that much about mxfenc. While you're at
it you might want to cherry-pick the DNxHD and DV patches from FFmpeg
(there's a couple in the works, so I'd wait a day or two).

> Thanks for the help =)

This way the reasoning behind the demuxer's logic is also archived
somewhere for posterity :)

/Tomas

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to