ape: fix silent block condition
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Jun 2021 08:34:24 +0000 (10:34 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Jun 2021 08:34:24 +0000 (10:34 +0200)
nihav-llaudio/src/codecs/ape.rs

index 773c116024e51ce8402de771c46ab5612d60dc76..c80dab233492cf41dfb57c51380d596939e73af1 100644 (file)
@@ -169,7 +169,7 @@ impl NADecoder for APEDecoder {
             if self.is_stereo {
                 self.right.resize(nblocks, 0);
             }
             if self.is_stereo {
                 self.right.resize(nblocks, 0);
             }
-            if (fflags & 3) == 0 {
+            if (!self.is_stereo && (fflags & 1) == 0) || (self.is_stereo && (fflags & 3) != 3) {
                 if !self.is_stereo || (fflags & 4) != 0 {
                     (self.decode_mono)(&mut coder, &mut self.left)?;
                     self.fmode.filter_mono(&mut self.left);
                 if !self.is_stereo || (fflags & 4) != 0 {
                     (self.decode_mono)(&mut coder, &mut self.left)?;
                     self.fmode.filter_mono(&mut self.left);