mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-30 01:59:44 +00:00
PSSH: Fix get_as_box parsing on arbitrary init data
An IOError can occur if the mp4 box parsing fails because it could not read enough bytes.
This commit is contained in:
parent
6a286a4c23
commit
97126391c4
@ -112,7 +112,7 @@ class PSSH:
|
|||||||
if isinstance(data, bytes):
|
if isinstance(data, bytes):
|
||||||
try:
|
try:
|
||||||
data = Box.parse(data)
|
data = Box.parse(data)
|
||||||
except construct.ConstructError:
|
except (IOError, construct.ConstructError):
|
||||||
if strict:
|
if strict:
|
||||||
try:
|
try:
|
||||||
cenc_header = WidevinePsshData()
|
cenc_header = WidevinePsshData()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user