X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-duck%2Fsrc%2Fcodecs%2Fvp56.rs;h=2ab474bbb336df23a4b89b80a80630e0edfcff35;hb=6f2630992fe340ad1a122ec10c649f756e478185;hp=807756a495687533836950daa513237d528c2c14;hpb=8dd7f6798f3efb78b5b09dd71229a28c66099d4b;p=nihav.git diff --git a/nihav-duck/src/codecs/vp56.rs b/nihav-duck/src/codecs/vp56.rs index 807756a..2ab474b 100644 --- a/nihav-duck/src/codecs/vp56.rs +++ b/nihav-duck/src/codecs/vp56.rs @@ -486,7 +486,7 @@ impl VP56Decoder { let hdr = br.parse_header(&mut bc)?; validate!((hdr.offset as usize) < aoffset); //XXX: take alpha 3 byte offset into account? - if hdr.mb_w != 0 { + if hdr.mb_w != 0 && (usize::from(hdr.mb_w) != self.mb_w || usize::from(hdr.mb_h) != self.mb_h) { self.set_dimensions((hdr.mb_w as usize) * 16, (hdr.mb_h as usize) * 16); } let fmt = if !self.has_alpha { @@ -633,7 +633,7 @@ impl VP56Decoder { self.fstate.last_idx = [24; 4]; for mb_x in 0..self.mb_w { self.fstate.mb_x = mb_x; - self.decode_mb(dframe, bc, &mut cr, br, &hdr, alpha)?; + self.decode_mb(dframe, bc, &mut cr, br, hdr, alpha)?; self.dc_pred.next_mb(); } self.dc_pred.update_row();