From 10dedf0d7c3c2fd9b101881ae6a01e6338a958e1 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 23 Feb 2023 17:48:24 +0100 Subject: [PATCH] cinepakenc: fix mask output optimisation --- nihav-commonfmt/src/codecs/cinepakenc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index c6af8f6..4729cd6 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -883,7 +883,7 @@ impl CinepakEncoder { let mut skip = true; for mask in self.masks.masks.iter() { bw.write_u32be(*mask)?; - if *mask == 0 { continue; } + if *mask == 0 && skip { continue; } let mut bit = 1 << 31; while bit > 0 { if skip { -- 2.39.5