search_for_quantizers_faac: fix curband
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Jun 2012 16:35:05 +0000 (18:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Jun 2012 22:55:26 +0000 (00:55 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33775c3507f4e0977d8ef1d8c5cbd167d0429319)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aaccoder.c

index b6fefd3..b48da99 100644 (file)
@@ -878,7 +878,7 @@ static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s,
     } else {
         for (w = 0; w < 8; w++) {
             const float *coeffs = sce->coeffs + w*128;
-            start = 0;
+            curband = start = 0;
             for (i = 0; i < 128; i++) {
                 if (i - start >= sce->ics.swb_sizes[curband]) {
                     start += sce->ics.swb_sizes[curband];