]> git.nihav.org Git - nihav.git/commitdiff
indeo3enc: fix always enabled frame recompression
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 15 Feb 2023 18:49:20 +0000 (19:49 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 15 Feb 2023 18:49:20 +0000 (19:49 +0100)
nihav-indeo/src/codecs/indeo3enc/mod.rs

index 1c6bf77bc1972fe2cc10c6ee42bacd53d3a1bbc0..a3a31775a7bc5f27b9ab0b67ea6f3b241a00e71e 100644 (file)
@@ -355,7 +355,7 @@ impl NAEncoder for Indeo3Encoder {
             self.encode_planes(&mut dbuf, &trees, is_intra)?;
 
             let cur_quant = self.cenc.quant.unwrap_or(42);
-            if !is_intra && cur_quant < 8 {
+            if self.try_again && !is_intra && cur_quant < 8 {
                 let expected_size = self.rc.get_expected_size();
                 if expected_size > 0 {
                     let cur_size = dbuf.len() as u32;