]> git.nihav.org Git - nihav.git/commitdiff
indeo: reorder frames for Indeo4
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 7 Oct 2022 16:38:52 +0000 (18:38 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 7 Oct 2022 12:46:19 +0000 (14:46 +0200)
nihav-indeo/src/codecs/ivibr.rs

index 72a9480ec6c81de6281f33ca01948f5fc67e64ac..9165d017d777297715faddb230c3b7559528af97 100644 (file)
@@ -943,6 +943,11 @@ br.skip(skip_part as u32)?;
                 self.ftype = IVIFrameType::Intra;
             }
         }
+        if self.bref.is_some() && self.ftype == IVIFrameType::Inter {
+            let mut bref: Option<NABufferType> = Some(res.unwrap());
+            mem::swap(&mut bref, &mut self.bref);
+            return Ok(bref.unwrap());
+        }
         if let Ok(NABufferType::None) = res {
             if self.bref.is_some() {
                 let mut bref: Option<NABufferType> = None;