mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-29 22:24:36 +02:00
PSSH: Fix check of Cenc Header data in get_as_box()
This commit is contained in:
parent
a3102ded18
commit
676110c01e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user