From 9e8a5d2d663e9e88cac9cff09d12385320331c3d Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 4 Feb 2018 18:49:49 +0100 Subject: [PATCH] clearvideo: implement skip frame --- src/codecs/clearvideo.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/codecs/clearvideo.rs b/src/codecs/clearvideo.rs index 6b880e1..7b31c0d 100644 --- a/src/codecs/clearvideo.rs +++ b/src/codecs/clearvideo.rs @@ -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); -- 2.39.5