From: Kostya Shishkov Date: Sat, 3 Oct 2020 13:38:51 +0000 (+0200) Subject: ape: zero samples in silent frames X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=06fc12ca7c3847de59211b891c325c02bd2f1795;p=nihav.git ape: zero samples in silent frames --- diff --git a/nihav-llaudio/src/codecs/ape.rs b/nihav-llaudio/src/codecs/ape.rs index a89f0c5..773c116 100644 --- a/nihav-llaudio/src/codecs/ape.rs +++ b/nihav-llaudio/src/codecs/ape.rs @@ -181,6 +181,11 @@ impl NADecoder for APEDecoder { (self.decode_stereo)(&mut coder, &mut self.left, &mut self.right)?; self.fmode.filter_stereo(&mut self.left, &mut self.right); } + } else { + for l in self.left.iter_mut() { *l = 0; } + if self.is_stereo { + for r in self.right.iter_mut() { *r = 0; } + } } if self.version >= 0x3990 || nblocks == self.blocksperframe {