]> git.nihav.org Git - nihav.git/commitdiff
clearvideo: align dimensions to 32 for RealVideo variant
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 22 Nov 2022 16:49:56 +0000 (17:49 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 22 Nov 2022 16:49:56 +0000 (17:49 +0100)
nihav-commonfmt/src/codecs/clearvideo.rs

index 731f8485213a3a16ce99edf92b813b2e9e73b4b3..52bfe2bab7efc4cb0ca652616765a3cae13b43c4 100644 (file)
@@ -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;