From: Kostya Shishkov Date: Sun, 3 Mar 2024 14:00:19 +0000 (+0100) Subject: hwdec_vaapi: ignore high-profile extradata tail when it is not correct X-Git-Url: https://git.nihav.org/?p=nihav-player.git;a=commitdiff_plain;h=bf56f1530cd35b68bfca88c10e3170dabf5f6f02 hwdec_vaapi: ignore high-profile extradata tail when it is not correct --- diff --git a/hwdec-vaapi/src/lib.rs b/hwdec-vaapi/src/lib.rs index 7b580d5..1ef3e41 100644 --- a/hwdec-vaapi/src/lib.rs +++ b/hwdec-vaapi/src/lib.rs @@ -484,7 +484,10 @@ impl VaapiH264Decoder { match profile { 100 | 110 | 122 | 144 => { let b = br.read_byte()?; - validate!((b & 0xFC) == 0xFC); + // some encoders put something different here + if (b & 0xFC) != 0xFC { + return Ok(()); + } // b & 3 -> chroma format let b = br.read_byte()?; validate!((b & 0xF8) == 0xF8);