]> git.nihav.org Git - nihav-encoder.git/commitdiff
palettise: ignore skip frames
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 16 Apr 2026 19:13:37 +0000 (21:13 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 16 Apr 2026 19:13:37 +0000 (21:13 +0200)
src/palettise.rs

index bcf1252c0d62c54c2095be7f609a0e4b77b29530..5bffb7011a212b206ee44f0d1d1bfabcf3b19c84 100644 (file)
@@ -258,6 +258,9 @@ impl Palettiser {
     }
     pub fn palettise_frame(&self, pic_in: &NABufferType, pic_out: &mut NABufferType) -> Result<(), &'static str> {
 // todo remap already paletted format
+        if matches!(pic_in, NABufferType::None) {
+            return Ok(());
+        }
         if let (Some(ref sbuf), Some(ref mut dbuf)) = (pic_in.get_vbuf(), pic_out.get_vbuf()) {
             let ioff = sbuf.get_offset(0);
             let (w, h) = sbuf.get_dimensions(0);