From b9f94e7b76cfb2544ad8c1af0d6ae4476a03e8f2 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 27 May 2020 17:24:25 +0200 Subject: [PATCH] core/soundcvt: fix conversion of packed data --- nihav-core/src/soundcvt/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.39.5