From 4e376911a139fb42d62c31eb02563da3614b2baa Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 7 Mar 2020 18:36:07 +0100 Subject: [PATCH] binkvid: align width to 8 when calculating bundle sizes --- nihav-rad/src/codecs/binkvid.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nihav-rad/src/codecs/binkvid.rs b/nihav-rad/src/codecs/binkvid.rs index 3b98791..e68f1f3 100644 --- a/nihav-rad/src/codecs/binkvid.rs +++ b/nihav-rad/src/codecs/binkvid.rs @@ -534,6 +534,7 @@ impl BinkDecoder { self.run.data.resize(size, 0); } fn init_bundle_lengths(&mut self, w: usize, bw: usize) { + let w = (w + 7) & !7; self.btype.bits = calc_len(w >> 3); self.sbtype.bits = calc_len(w >> 4); self.colors.bits = calc_len(bw * 64); -- 2.39.5