PSSH: Fix check of Cenc Header data in get_as_box()

This commit is contained in:
rlaphoenix 2022-07-30 01:33:21 +01:00
parent a3102ded18
commit 676110c01e
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class PSSH:
if isinstance(data, str):
data = base64.b64decode(data)
if isinstance(data, bytes):
if base64.b64encode(data) == b"CAES": # likely widevine pssh data
if base64.b64encode(data).startswith(b"CAES"): # likely widevine pssh data
try:
cenc_header = WidevinePsshData()
cenc_header.ParseFromString(data)