From 643fbf1db84a10569f4152b767c06e500b954643 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 28 Sep 2025 05:59:23 +0200 Subject: [PATCH] escape: relax dimensions checking --- nihav-acorn/src/codecs/escape.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 { -- 2.39.5