summaryrefslogtreecommitdiff
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorRobert Swain <robert.swain@gmail.com>2008-09-13 20:22:31 +0000
committerRobert Swain <robert.swain@gmail.com>2008-09-13 20:22:31 +0000
commit408992bae211c09e7460b4738134a569bd93c58a (patch)
treeedeeb0bf6f25f2a74e9ed8ab6608bac24a95fdf0 /libavcodec/aac.c
parentab5ce4aeae7581e1de6cc8b331f0332627d39e09 (diff)
Operands of '+' are not necessarily evaluated in order so r15311 was pointless.
Splitting the assignment onto two lines should resolve the order issue. Originally committed as revision 15313 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index ace82ab62a..0e2db1267d 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -597,7 +597,8 @@ 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] = swb_offset[get_bits(gb, 6)] + get_bits(gb, 5);
+ pulse->pos[0] = swb_offset[get_bits(gb, 6)];
+ pulse->pos[0] += 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];