Mercurial > libavcodec.hg
diff ac3_parser.c @ 6527:32b984487899 libavcodec
Pass AACAC3ParseContext to sync() instead of individual arguments. Patch by
Bartlomiej Wolowiec (bartek wolowiec gmail com)
author | jbr |
---|---|
date | Sun, 23 Mar 2008 15:43:29 +0000 |
parents | 48759bfbd073 |
children | 5542d0c04a55 |
line wrap: on
line diff
--- a/ac3_parser.c Sat Mar 22 17:34:29 2008 +0000 +++ b/ac3_parser.c Sun Mar 23 15:43:29 2008 +0000 @@ -119,21 +119,20 @@ return 0; } -static int ac3_sync(const uint8_t *buf, int *channels, int *sample_rate, - int *bit_rate, int *samples) +static int ac3_sync(AACAC3ParseContext *hdr_info) { int err; AC3HeaderInfo hdr; - err = ff_ac3_parse_header(buf, &hdr); + err = ff_ac3_parse_header(hdr_info->inbuf, &hdr); if(err < 0) return 0; - *sample_rate = hdr.sample_rate; - *bit_rate = hdr.bit_rate; - *channels = hdr.channels; - *samples = AC3_FRAME_SIZE; + hdr_info->sample_rate = hdr.sample_rate; + hdr_info->bit_rate = hdr.bit_rate; + hdr_info->channels = hdr.channels; + hdr_info->samples = AC3_FRAME_SIZE; return hdr.frame_size; }