From: Kostya Shishkov Date: Thu, 23 Feb 2023 16:53:43 +0000 (+0100) Subject: cinepakenc: fix detection of codebook changed part X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=2931e237d609968086a560eb2f9c7beaf320e44b cinepakenc: fix detection of codebook changed part --- diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index 4729cd6..28f9c93 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -391,7 +391,7 @@ impl CinepakEncoder { } } else { let mut end = 256; - for (i, (ncw, ocw)) in new_cb.iter().rev().zip(old_cb.iter().rev()).enumerate() { + for (i, (ncw, ocw)) in new_cb.iter().zip(old_cb.iter()).enumerate().rev() { if ncw == ocw { end = i; } else {