From 3cd340f1334d99c00899a2b8869edc440ade40c9 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 22 Nov 2022 17:49:56 +0100 Subject: [PATCH] clearvideo: align dimensions to 32 for RealVideo variant --- nihav-commonfmt/src/codecs/clearvideo.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nihav-commonfmt/src/codecs/clearvideo.rs b/nihav-commonfmt/src/codecs/clearvideo.rs index 731f848..52bfe2b 100644 --- a/nihav-commonfmt/src/codecs/clearvideo.rs +++ b/nihav-commonfmt/src/codecs/clearvideo.rs @@ -881,7 +881,10 @@ impl NADecoder for ClearVideoDecoder { #[allow(clippy::or_fun_call)] fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Video(vinfo) = info.get_properties() { - let w = vinfo.get_width(); + let mut w = vinfo.get_width(); + if self.is_rm { + w = (w + 0x1F) & !0x1F; + } let h = vinfo.get_height(); let f = vinfo.is_flipped(); let fmt = formats::YUV420_FORMAT; -- 2.30.2