]> git.nihav.org Git - nihav.git/commitdiff
qdraw: set bitdepth for the invoked sub-decoder
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 23 Sep 2026 15:24:11 +0000 (17:24 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 23 Sep 2026 15:24:11 +0000 (17:24 +0200)
nihav-qt/src/codecs/qdraw.rs

index 3448fe8926669d9ca90b348ba8dd6763ab5ee296..9b9f3770a39ab64ef9799c07bbf583add190324b 100644 (file)
@@ -455,7 +455,8 @@ impl NADecoder for QDrawDecoder {
                                 return Err(DecoderError::NotImplemented);
                             },
                         };
-                    let vinfo = NAVideoInfo::new(qwidth, qheight, false, fmt);
+                    let mut vinfo = NAVideoInfo::new(qwidth, qheight, false, fmt);
+                    vinfo.bits = (if depth > 32 { depth - 32 } else { depth }) as u8;
                     let info = NACodecInfo::new(cname, NACodecTypeInfo::Video(vinfo), None);
                     let stream = NAStream::new(StreamType::Video, 0, info, 1, 1, 0).into_ref();
                     if let Err(err) = dec.init(&mut dsupp, stream.get_info()) {