From: Kostya Shishkov Date: Wed, 7 Oct 2026 10:17:50 +0000 (+0200) Subject: nihav_codec_support/msstructs: ignore bitplanes for large enough bitdepth during... X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=5bec8a5a27aae8cba8795f7056c3a0947747488f;p=nihav.git nihav_codec_support/msstructs: ignore bitplanes for large enough bitdepth during valdation --- diff --git a/nihav-codec-support/src/codecs/msstructs.rs b/nihav-codec-support/src/codecs/msstructs.rs index e714083..a3f4db3 100644 --- a/nihav-codec-support/src/codecs/msstructs.rs +++ b/nihav-codec-support/src/codecs/msstructs.rs @@ -50,7 +50,7 @@ impl MSBitmapInfo { return Err("height"); } if !KNOWN_BAD_FORMATS.contains(&&self.compression) { - if self.planes == 0 || self.planes > self.bitcount { + if (self.planes == 0 && self.bitcount <= 8) || self.planes > self.bitcount { return Err("planes"); } if !(1..=32).contains(&self.bitcount) {