summaryrefslogtreecommitdiffstats
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2008-09-13 18:47:43 +0000
committerRobert Swain <robert.swain@gmail.com>2008-09-13 18:47:43 +0000
commit19645d742ea08b17fe5dafb378df8978a53a9277 (patch)
treedf563ca56e372bc543769dc8b387eee14d50ec83 /libavcodec/aac.c
parent46cd15ca31a54d265a1e255826b3dc9cbff463d5 (diff)
downloadffmpeg-streaming-19645d742ea08b17fe5dafb378df8978a53a9277.zip
ffmpeg-streaming-19645d742ea08b17fe5dafb378df8978a53a9277.tar.gz
Correct order of parsing for pulse scalefactor band and offset to match the
specification. Patch by Alex Converse (alex converse gmail com) Originally committed as revision 15311 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index b924e7b..ace82ab 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -597,7 +597,7 @@ static int decode_scalefactors(AACContext * ac, float sf[120], GetBitContext * g
static void decode_pulses(Pulse * pulse, GetBitContext * gb, const uint16_t * swb_offset) {
int i;
pulse->num_pulse = get_bits(gb, 2) + 1;
- pulse->pos[0] = get_bits(gb, 5) + swb_offset[get_bits(gb, 6)];
+ pulse->pos[0] = swb_offset[get_bits(gb, 6)] + get_bits(gb, 5);
pulse->amp[0] = get_bits(gb, 4);
for (i = 1; i < pulse->num_pulse; i++) {
pulse->pos[i] = get_bits(gb, 5) + pulse->pos[i-1];
OpenPOWER on IntegriCloud