atrac3: use correct loop variable in add_tonal_components()
authorMichael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Fri, 25 Jan 2013 20:03:53 +0000 (15:03 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Fri, 25 Jan 2013 21:16:24 +0000 (16:16 -0500)
Signed-off-by: Michael Karcher <ffmpeg@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org

libavcodec/atrac3.c

index 312b283..a46b0b1 100644 (file)
@@ -517,7 +517,7 @@ static int add_tonal_components(float *spectrum, int num_components,
         output   = &spectrum[components[i].pos];
 
         for (j = 0; j < components[i].num_coefs; j++)
-            output[i] += input[i];
+            output[j] += input[j];
     }
 
     return last_pos;