]> git.nihav.org Git - nihav.git/commitdiff
indeo3: handle skip frames
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 7 Dec 2019 15:30:26 +0000 (16:30 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 7 Dec 2019 15:30:26 +0000 (16:30 +0100)
nihav-indeo/src/codecs/indeo3.rs

index e0f8e563234661108bd173dfe92a86e919f105d2..4c5a6c5b68fee38edb832766f6e53f25b894195f 100644 (file)
@@ -680,6 +680,12 @@ impl NADecoder for Indeo3Decoder {
         if ver != 32 { return Err(DecoderError::NotImplemented); }
         let flags   = br.read_u16le()?;
         let size2   = br.read_u32le()?;
+        if size2 == 0x80 {
+            let mut frm = NAFrame::new_from_pkt(pkt, self.info.clone(), NABufferType::None);
+            frm.set_keyframe(false);
+            frm.set_frame_type(FrameType::Skip);
+            return Ok(frm.into_ref());
+        }
         validate!(((size2 + 7) >> 3) <= size);
         let cb      = br.read_byte()?;
         self.vq_offset = cb;