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):
|
if isinstance(data, str):
|
||||||
data = base64.b64decode(data)
|
data = base64.b64decode(data)
|
||||||
if isinstance(data, bytes):
|
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:
|
try:
|
||||||
cenc_header = WidevinePsshData()
|
cenc_header = WidevinePsshData()
|
||||||
cenc_header.ParseFromString(data)
|
cenc_header.ParseFromString(data)
|
||||||
|
|
Loading…
Reference in New Issue