forked from kenzuya/unshackle
fix(drm): read the init segment tenc KID when FFprobe is not installed
This commit is contained in:
@@ -78,9 +78,12 @@ def init_kid(init_data: bytes) -> UUID | None:
|
||||
|
||||
A pssh box is no source, because it can name the KIDs of other renditions too. The PIFF box is read by
|
||||
offset, and only when its AlgorithmID is not 0 (clear): pymp4 parses it but cannot build it again, so
|
||||
``get_boxes`` raises on it.
|
||||
``get_boxes`` raises on it. Without FFprobe it starts at the tenc KID.
|
||||
"""
|
||||
probe = ffprobe(init_data)
|
||||
try:
|
||||
probe = ffprobe(init_data)
|
||||
except OSError:
|
||||
probe = {}
|
||||
for stream in (probe or {}).get("streams") or []:
|
||||
enc_key_id = stream.get("tags", {}).get("enc_key_id")
|
||||
if enc_key_id:
|
||||
|
||||
Reference in New Issue
Block a user