Flash support
[nihav.git] / nihav-duck / src / codecs / vp56.rs
index 807756a495687533836950daa513237d528c2c14..01e8171da21853c6760bf98d9e0c0a376e0a34ef 100644 (file)
@@ -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 {