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

Michael Niedermayer michaelni
Wed Nov 14 22:05:52 CET 2007


On Wed, Nov 14, 2007 at 12:12:00PM +0000, Ian Caulfield wrote:
> 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?

id only read enough in as needed for the size in the first pass

also we could add a special case for the case where the input containes
a whole packet or more so no memcpy is done but thats seperate
and we shouldnt waste time with it until the parser is in svn

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071114/a8233cd1/attachment.pgp>



More information about the ffmpeg-devel mailing list