]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Make set coup.gain[c][0] aand only coup.gain[c][0] is set for a independently switche...
authoralexc <alexc@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 13 Feb 2009 16:06:22 +0000 (16:06 +0000)
committeralexc <alexc@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 13 Feb 2009 16:06:22 +0000 (16:06 +0000)
Discussed/OKed at http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-February/062219.html

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17210 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/aac.c

index 904c9510c846585b1474d76dc61db5976860e37f..c0673bf13331576028c6d37d417c107c4e097e6e 100644 (file)
@@ -1165,6 +1165,9 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
             gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0;
             gain_cache = pow(scale, -gain);
         }
+        if (coup->coupling_point == AFTER_IMDCT) {
+            coup->gain[c][0] = gain_cache;
+        } else {
         for (g = 0; g < sce->ics.num_window_groups; g++) {
             for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) {
                 if (sce->band_type[idx] != ZERO_BT) {
@@ -1184,6 +1187,7 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
                 }
             }
         }
+        }
     }
     return 0;
 }