diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-05-25 17:46:59 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-05-25 17:51:26 +0200 |
commit | 252f4009f1e79679923058be5ea7f89cdce4d506 (patch) | |
tree | cf49720e5b37feb7c70923b29e1041cf3bceb246 | |
parent | d72be413a3dead75fadd0a6abc3cf9b15da7ce79 (diff) | |
download | nihav-252f4009f1e79679923058be5ea7f89cdce4d506.tar.gz |
zmbvenc: handle I-frames that turned out to be skip frames
-rw-r--r-- | nihav-commonfmt/src/codecs/zmbvenc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nihav-commonfmt/src/codecs/zmbvenc.rs b/nihav-commonfmt/src/codecs/zmbvenc.rs index 52e02e5..d7be605 100644 --- a/nihav-commonfmt/src/codecs/zmbvenc.rs +++ b/nihav-commonfmt/src/codecs/zmbvenc.rs @@ -139,13 +139,14 @@ impl ZMBVEncoder { } } fn encode_intra(&mut self, bw: &mut ByteWriter, buf: NABufferType) -> EncoderResult<()> { - let bpp = buf_type_to_bpp(&buf); + let mut bpp = buf_type_to_bpp(&buf); if let NABufferType::None = buf { if self.bpp == 0 { return Err(EncoderError::FormatError); } self.frm1.copy_from_slice(&self.frm2); + bpp = self.bpp; } else { if bpp == 0 { return Err(EncoderError::FormatError); |