]> git.nihav.org Git - nihav.git/commitdiff
clearvideo: implement skip frame
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 4 Feb 2018 17:49:49 +0000 (18:49 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 4 Feb 2018 17:49:49 +0000 (18:49 +0100)
src/codecs/clearvideo.rs

index 6b880e1cb67651e99ddf75664029f88665dfbdf6..7b31c0d371fb1c60a0c36c6651f9541bf07772c1 100644 (file)
@@ -721,6 +721,14 @@ impl NADecoder for ClearVideoDecoder {
                 0
             };
         if src.len() <= off + 1 { return Err(DecoderError::ShortData); }
+
+        if (src[off] & 0x7F) == 0x30 {
+            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(Rc::new(RefCell::new(frm)));
+        }
+
         let is_intra = (src[off] & 2) == 2;
         let mut br = BitReader::new(&src[(off + 1)..], src.len() - (off + 1), BitReaderMode::BE);