diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-03-23 15:43:29 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-03-23 15:43:29 +0000 |
commit | c599e297e714b572e1bea2f4e59c319dce13b174 (patch) | |
tree | ec77afb8956ddb004532847b0908f5c645eb6592 /libavcodec/aac_parser.c | |
parent | 721392606bafd5a6971cce2d93fe5d0bc2a76927 (diff) | |
download | ffmpeg-c599e297e714b572e1bea2f4e59c319dce13b174.tar.gz |
Pass AACAC3ParseContext to sync() instead of individual arguments. Patch by
Bartlomiej Wolowiec (bartek wolowiec gmail com)
Originally committed as revision 12564 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac_parser.c')
-rw-r--r-- | libavcodec/aac_parser.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c index ac129c23b2..37f014c571 100644 --- a/libavcodec/aac_parser.c +++ b/libavcodec/aac_parser.c @@ -38,13 +38,12 @@ static const int aac_channels[8] = { }; -static int aac_sync(const uint8_t *buf, int *channels, int *sample_rate, - int *bit_rate, int *samples) +static int aac_sync(AACAC3ParseContext *hdr_info) { GetBitContext bits; int size, rdb, ch, sr; - init_get_bits(&bits, buf, AAC_HEADER_SIZE * 8); + init_get_bits(&bits, hdr_info->inbuf, AAC_HEADER_SIZE * 8); if(get_bits(&bits, 12) != 0xfff) return 0; @@ -73,10 +72,10 @@ static int aac_sync(const uint8_t *buf, int *channels, int *sample_rate, skip_bits(&bits, 11); /* adts_buffer_fullness */ rdb = get_bits(&bits, 2); /* number_of_raw_data_blocks_in_frame */ - *channels = aac_channels[ch]; - *sample_rate = aac_sample_rates[sr]; - *samples = (rdb + 1) * 1024; - *bit_rate = size * 8 * *sample_rate / *samples; + hdr_info->channels = aac_channels[ch]; + hdr_info->sample_rate = aac_sample_rates[sr]; + hdr_info->samples = (rdb + 1) * 1024; + hdr_info->bit_rate = size * 8 * hdr_info->sample_rate / hdr_info->samples; return size; } |