codecs: make IPB shuffler provide non-confusing references for B-frames
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 18 Aug 2018 12:14:45 +0000 (14:14 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 1 Sep 2018 09:28:39 +0000 (11:28 +0200)
src/codecs/mod.rs

index 4897a7b6533bc7192237beacb81686a7b2f613ff..796973c250c1c62910176a1f89b0f215ae4db8f7 100644 (file)
@@ -138,6 +138,22 @@ impl IPBShuffler {
             None
         }
     }
+    #[allow(dead_code)]
+    fn get_b_fwdref(&mut self) -> Option<NAVideoBuffer<u8>> {
+        if let Some(ref frm) = self.nextframe {
+            Some(frm.clone())
+        } else {
+            None
+        }
+    }
+    #[allow(dead_code)]
+    fn get_b_bwdref(&mut self) -> Option<NAVideoBuffer<u8>> {
+        if let Some(ref frm) = self.lastframe {
+            Some(frm.clone())
+        } else {
+            None
+        }
+    }
 }
 
 #[derive(Debug,Clone,Copy)]