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):
|
||||
try:
|
||||
data = Box.parse(data)
|
||||
except construct.ConstructError:
|
||||
except (IOError, construct.ConstructError):
|
||||
if strict:
|
||||
try:
|
||||
cenc_header = WidevinePsshData()
|
||||
|
|
Loading…
Reference in New Issue