From: Kostya Shishkov Date: Sat, 7 Mar 2020 17:36:07 +0000 (+0100) Subject: binkvid: align width to 8 when calculating bundle sizes X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=4e376911a139fb42d62c31eb02563da3614b2baa;p=nihav.git binkvid: align width to 8 when calculating bundle sizes --- 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);