[FFmpeg-soc] [soc]: r2021 -?in?eac3:?ac3dec.h?ac3dec_data.c?ac3dec_data.h eac3dec.c
Michael Niedermayer
michaelni at gmx.at
Sat Mar 29 01:34:59 CET 2008
On Sat, Mar 29, 2008 at 12:19:43AM +0100, Bartlomiej Wolowiec wrote:
> > > 3.change of ff_aac_ac3_parse to make it react correctly to result
> > > returned in flag.
>
> According to suggestions, I wrote new patch to AAC/AC3 parser.
>
> Current data about the stream are taken from frames FRAME_START and
> FRAME_COMPLETE. It will be improved in the next patch.
> --
> Bartlomiej Wolowiec
> Index: libavcodec/aac_ac3_parser.c
> ===================================================================
> --- libavcodec/aac_ac3_parser.c (wersja 12623)
> +++ libavcodec/aac_ac3_parser.c (kopia robocza)
> @@ -29,35 +29,50 @@
> const uint8_t *buf, int buf_size)
> {
> AACAC3ParseContext *s = s1->priv_data;
> - AACAC3FrameFlag frame_flag;
> const uint8_t *buf_ptr;
> int len;
>
> *poutbuf = NULL;
> *poutbuf_size = 0;
>
> + if(s->frame_ptr == NULL) {
> + //after sending package of data in the end there was one new header
> + memcpy(s->inbuf, s->frame_start, s->header_size);
> + s->frame_start = s->inbuf;
> + s->frame_ptr = s->frame_start + s->header_size;
> + }
Instead of this i think you could just return a smaller number.
We do have code in the parser that does what is needed to move this
to the begin (search for overread) in parser*.
> +
> buf_ptr = buf;
> while (buf_size > 0) {
> int size_needed= s->frame_size ? s->frame_size : s->header_size;
> - len = s->inbuf_ptr - s->inbuf;
> + len = s->frame_ptr - s->frame_start;
Variable renaming is cosmetic and should be in a seperate patch!
[...]
> @@ -43,6 +44,7 @@
> int sample_rate;
> int bit_rate;
> int samples;
> + AACAC3FrameFlag frame_flag;
> } AACAC3ParseContext;
why?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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-soc/attachments/20080329/1f053310/attachment.pgp>
More information about the FFmpeg-soc
mailing list