forked from kenzuya/unshackle
fix(drm): correct PSSH system ID comparison in PlayReady
Remove erroneous `.bytes` accessor from PSSH.SYSTEM_ID comparisons in from_track() and from_init_data() methods. The pyplayready PSSH.SYSTEM_ID is already the correct type for comparison with parsed PSSH box system_ID values.
This commit is contained in:
@@ -168,7 +168,7 @@ class PlayReady:
|
|||||||
pssh_boxes.extend(list(get_boxes(init_data, b"pssh")))
|
pssh_boxes.extend(list(get_boxes(init_data, b"pssh")))
|
||||||
tenc_boxes.extend(list(get_boxes(init_data, b"tenc")))
|
tenc_boxes.extend(list(get_boxes(init_data, b"tenc")))
|
||||||
|
|
||||||
pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID.bytes), None)
|
pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID), None)
|
||||||
if not pssh:
|
if not pssh:
|
||||||
raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.")
|
raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.")
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ class PlayReady:
|
|||||||
if enc_key_id:
|
if enc_key_id:
|
||||||
kid = UUID(bytes=base64.b64decode(enc_key_id))
|
kid = UUID(bytes=base64.b64decode(enc_key_id))
|
||||||
|
|
||||||
pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID.bytes), None)
|
pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID), None)
|
||||||
if not pssh:
|
if not pssh:
|
||||||
raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.")
|
raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user