From: Kostya Shishkov Date: Wed, 27 May 2020 15:24:25 +0000 (+0200) Subject: core/soundcvt: fix conversion of packed data X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=b9f94e7b76cfb2544ad8c1af0d6ae4476a03e8f2;p=nihav.git core/soundcvt: fix conversion of packed data --- diff --git a/nihav-core/src/soundcvt/mod.rs b/nihav-core/src/soundcvt/mod.rs index bea95d1..6864f7e 100644 --- a/nihav-core/src/soundcvt/mod.rs +++ b/nihav-core/src/soundcvt/mod.rs @@ -368,8 +368,8 @@ Result { } let mut dst_buf = ret.unwrap(); - let sstep = src.get_audio_step(); - let dstep = dst_buf.get_audio_step(); + let sstep = src.get_audio_step().max(1); + let dstep = dst_buf.get_audio_step().max(1); let sr: Box = match src { NABufferType::AudioU8(ref ab) => { let stride = ab.get_stride();