From 1047e98335ad782b48bcc88e9277336576c20597 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 15 Jun 2020 14:37:15 +0200 Subject: [PATCH] cinepakenc: fix V1-only intra mode --- nihav-commonfmt/src/codecs/cinepakenc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index a77e58a..882b637 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -707,10 +707,10 @@ impl CinepakEncoder { self.render_stripe(true, start_line, end_line); - if self.v1_idx.len() == 0 { + if self.v4_idx.len() == 0 { bw.write_byte(0x32)?; - bw.write_u24be((self.v4_idx.len() + 4) as u32)?; - bw.write_buf(self.v4_idx.as_slice())?; + bw.write_u24be((self.v1_idx.len() + 4) as u32)?; + bw.write_buf(self.v1_idx.as_slice())?; } else { bw.write_byte(0x30)?; bw.write_u24be(0)?; -- 2.39.5