[FFmpeg-devel] [PATCH] MLP/TrueHD decoder

Ian Caulfield ian.caulfield
Wed Nov 14 13:12:00 CET 2007


On Nov 14, 2007 11:52 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> On Wed, Nov 14, 2007 at 11:31:43AM +0000, Ian Caulfield wrote:
> > On Nov 14, 2007 11:10 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > >
> > > well add a
> > > if(size to big) return packet
> >
> > Fair enough. I'm having trouble figuring out the cleanest way to
> > implement the code to find the header size. ff_combine_frame seems to
> > be designed for cases where packet boundaries can be easily found -
> > not where the size of a packet is determined by data within the
> > packet. What's the nicest way to get hold of the third and fourth
> > bytes of the packet, handling the case where these might not be
> > supplied together?
>
> they should be together after ff_combine_frame() combined them in its
> internal buffer

So, should I get ff_combine_frame to read in all the data supplied to
the parser, check if at least four bytes are present and read the size
from there, and then call ff_combine_frame again with a negative
offset if (as is likely) we did overread?

Ian




More information about the ffmpeg-devel mailing list