From: Kostya Shishkov Date: Sun, 28 Sep 2025 03:59:23 +0000 (+0200) Subject: escape: relax dimensions checking X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=643fbf1db84a10569f4152b767c06e500b954643;p=nihav.git escape: relax dimensions checking --- diff --git a/nihav-acorn/src/codecs/escape.rs b/nihav-acorn/src/codecs/escape.rs index d5b4e07..efe8ca5 100644 --- a/nihav-acorn/src/codecs/escape.rs +++ b/nihav-acorn/src/codecs/escape.rs @@ -577,7 +577,7 @@ impl NADecoder for Escape130Decoder { fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Video(vinfo) = info.get_properties() { let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, YUV420_FORMAT)); - validate!((vinfo.get_width() | vinfo.get_height()) & 7 == 0); + validate!((vinfo.get_width() | vinfo.get_height()) & 1 == 0); self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref(); self.width = vinfo.get_width(); self.blocks = vec![E130Block::default(); vinfo.get_width() * vinfo.get_height() / 4]; @@ -740,7 +740,6 @@ impl NADecoder for EscapeAnyDecoder { fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Video(vinfo) = info.get_properties() { let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, YUV420_FORMAT)); - validate!((vinfo.get_width() | vinfo.get_height()) & 7 == 0); self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref(); Ok(()) } else {