diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2008-10-28 14:50:46 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2008-10-28 14:50:46 +0000 |
commit | 9ed73b48708b2cc13db5d07c4b6c4c65022cb732 (patch) | |
tree | ac7f234446420f5be298e6eb5544ecfdecdb8d9c /libavcodec/dca.c | |
parent | 6f02853d14e7226b058ea59a1032c7c34f2526a8 (diff) | |
download | ffmpeg-streaming-9ed73b48708b2cc13db5d07c4b6c4c65022cb732.zip ffmpeg-streaming-9ed73b48708b2cc13db5d07c4b6c4c65022cb732.tar.gz |
Fix selection of quant step table
Originally committed as revision 15734 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r-- | libavcodec/dca.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index aa89e84..f550483 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -99,6 +99,7 @@ typedef struct { int amode; ///< audio channels arrangement int sample_rate; ///< audio sampling rate int bit_rate; ///< transmission bit rate + int bit_rate_index; ///< transmission bit rate index int downmix; ///< embedded downmix enabled int dynrange; ///< embedded dynamic range flag @@ -247,7 +248,8 @@ static int dca_parse_frame_header(DCAContext * s) s->sample_rate = dca_sample_rates[get_bits(&s->gb, 4)]; if (!s->sample_rate) return -1; - s->bit_rate = dca_bit_rates[get_bits(&s->gb, 5)]; + s->bit_rate_index; = get_bits(&s->gb, 5); + s->bit_rate = dca_bit_rates[s->bit_rate_index]; if (!s->bit_rate) return -1; @@ -852,7 +854,7 @@ static int dca_subsubframe(DCAContext * s) */ /* Select quantization step size table */ - if (s->bit_rate == 0x1f) + if (s->bit_rate_index == 0x1f) quant_step_table = lossless_quant_d; else quant_step_table = lossy_quant_d; |