]> git.nihav.org Git - nihav.git/commitdiff
wavmux: add parentheses to size calculation expression
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 15 Aug 2025 15:27:08 +0000 (17:27 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 15 Aug 2025 15:27:08 +0000 (17:27 +0200)
nihav-commonfmt/src/muxers/wav.rs

index 981a2f6db75bdb52c2101e9f2b02b965b7d87112..2e6dc0cb25a413969b3d4628078fac33dab77dbb 100644 (file)
@@ -65,7 +65,7 @@ impl<'a> MuxCore<'a> for WAVMuxer<'a> {
         if stream.get_info().get_name() != "pcm" || ainfo.block_len > 0 {
             self.bw.write_u16le(ainfo.block_len as u16)?;
         } else {
-            self.bw.write_u16le(u16::from(ainfo.channels) * u16::from(ainfo.format.bits) >> 3)?;
+            self.bw.write_u16le((u16::from(ainfo.channels) * u16::from(ainfo.format.bits)) >> 3)?;
         }
         self.bw.write_u16le(u16::from(ainfo.format.bits))?;
         if let Some(ref buf) = stream.get_info().get_extradata() {