From d2e570b0eb0b9d6faed9ffcd320b5ea9a49bbe32 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 24 Jun 2025 17:42:09 +0200 Subject: [PATCH] hwdec-vaapi: ignore some bits in the avcC box Apparently some encoders do not bother about setting them to all ones. --- hwdec-vaapi/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwdec-vaapi/src/lib.rs b/hwdec-vaapi/src/lib.rs index 27142e8..3e23a46 100644 --- a/hwdec-vaapi/src/lib.rs +++ b/hwdec-vaapi/src/lib.rs @@ -495,10 +495,10 @@ impl VaapiH264Decoder { let _compatibility = br.read_byte()?; let _level = br.read_byte()?; let b = br.read_byte()?; - validate!((b & 0xFC) == 0xFC); + //validate!((b & 0xFC) == 0xFC); self.nal_len = (b & 3) + 1; let b = br.read_byte()?; - validate!((b & 0xE0) == 0xE0); + //validate!((b & 0xE0) == 0xE0); let num_sps = (b & 0x1F) as usize; for _ in 0..num_sps { let len = br.read_u16be()? as usize; -- 2.39.5