aac: fix the window group advancement in joint-stereo reconstruction
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 27 Aug 2020 14:51:55 +0000 (16:51 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 27 Aug 2020 14:51:55 +0000 (16:51 +0200)
Reported by Philip Deljanov

nihav-commonfmt/src/codecs/aac.rs

index e5697b7098a420b3c72557f5fa21a976c4b41ea7..9f9588b534dc33347ee5f070c473acf166f34aa8 100644 (file)
@@ -935,7 +935,7 @@ impl ChannelPair {
         if common_window && self.ms_mask_present != 0 {
             let mut g = 0;
             for w in 0..self.ics[0].info.num_windows {
         if common_window && self.ms_mask_present != 0 {
             let mut g = 0;
             for w in 0..self.ics[0].info.num_windows {
-                if w > 0 && self.ics[0].info.scale_factor_grouping[w - 1] {
+                if w > 0 && !self.ics[0].info.scale_factor_grouping[w - 1] {
                     g += 1;
                 }
                 for sfb in 0..self.ics[0].info.max_sfb {
                     g += 1;
                 }
                 for sfb in 0..self.ics[0].info.max_sfb {