From 3c8c667d352fc7522c3f15e8280c7cce614fbadd Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 18 Aug 2018 14:14:45 +0200 Subject: [PATCH] codecs: make IPB shuffler provide non-confusing references for B-frames --- src/codecs/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/codecs/mod.rs b/src/codecs/mod.rs index 4897a7b..796973c 100644 --- a/src/codecs/mod.rs +++ b/src/codecs/mod.rs @@ -138,6 +138,22 @@ impl IPBShuffler { None } } + #[allow(dead_code)] + fn get_b_fwdref(&mut self) -> Option> { + if let Some(ref frm) = self.nextframe { + Some(frm.clone()) + } else { + None + } + } + #[allow(dead_code)] + fn get_b_bwdref(&mut self) -> Option> { + if let Some(ref frm) = self.lastframe { + Some(frm.clone()) + } else { + None + } + } } #[derive(Debug,Clone,Copy)] -- 2.39.5