[FFmpeg-soc] extension of ac3 parser

Bartlomiej Wolowiec bartek.wolowiec at gmail.com
Mon Apr 21 00:49:41 CEST 2008


On niedziela, 20 kwietnia 2008, Michael Niedermayer wrote:
> > Index: libavcodec/ac3_parser.h
> > ===================================================================
> > --- libavcodec/ac3_parser.h	(wersja 12910)
> > +++ libavcodec/ac3_parser.h	(kopia robocza)
> > @@ -35,14 +35,15 @@
> >
> >  /**
> >   * Parses AC-3 frame header.
> > - * Parses the header up to the lfeon element, which is the first 52 or
> > 54 bits - * depending on the audio coding mode.
> > + * Parses the header up to the lfeon element, which is the first 52, 54,
> > or 104 bits + * depending on the audio coding mode and read_channel_map.
> >   * @param buf[in] Array containing the first 7 bytes of the frame.
>
>                                                 ^^^^^^^
>
> 7 bytes and 104 bits ?
>
> >   * @param hdr[out] Pointer to struct where header info is written.
> >
> > + * @param read_channel_map[in] Determines whether channel_map is to be
> > set
>
> why is this conditional and not always done?
>
> [...]

Because  e.g. while parsing in buffer there are just 8 bytes, which won't be 
enough to read full information. According to solution proposed by you, 
parser firstly reads 7-byte headers, then, when full set of frames is in 
buffer, it sets number of channels etc.

I enclose corrected patch

-- 
Bartlomiej Wolowiec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_channel_map.patch
Type: text/x-diff
Size: 6573 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080421/c84fbb6c/attachment.patch>


More information about the FFmpeg-soc mailing list