]> git.nihav.org Git - nihav-player.git/commitdiff
hwdec-vaapi: ignore some bits in the avcC box
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 24 Jun 2025 15:42:09 +0000 (17:42 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 24 Jun 2025 15:42:09 +0000 (17:42 +0200)
Apparently some encoders do not bother about setting them to all ones.

hwdec-vaapi/src/lib.rs

index 27142e88e417877ee69ca584d7fda81a1a7f3925..3e23a46d7650cc4eb5c4c836ae5ef353210d1716 100644 (file)
@@ -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;