aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-commonfmt
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2023-02-23 17:48:24 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2023-02-23 17:48:24 +0100
commit10dedf0d7c3c2fd9b101881ae6a01e6338a958e1 (patch)
treee84cd98fb5efc00c738b1c7c3f17c0df1095fecc /nihav-commonfmt
parent405cec9eed5d7f58440ec8495f5cbc1f5c6fee40 (diff)
downloadnihav-10dedf0d7c3c2fd9b101881ae6a01e6338a958e1.tar.gz
cinepakenc: fix mask output optimisation
Diffstat (limited to 'nihav-commonfmt')
-rw-r--r--nihav-commonfmt/src/codecs/cinepakenc.rs2
1 files changed, 1 insertions, 1 deletions
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 {