mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-10 08:29:00 +00:00
fix(dash): add CENC namespace support for PSSH extraction
Some MPD manifests use the cenc: namespace prefix for PSSH elements (e.g., <cenc:pssh>) instead of non-namespaced <pssh>. This caused DRM extraction to fail for services.
- Add {urn:mpeg:cenc:2013}pssh fallback for Widevine PSSH extraction
- Add {urn:mpeg:cenc:2013}pssh fallback for PlayReady PSSH extraction
This commit is contained in:
@@ -866,7 +866,7 @@ class DASH:
|
|||||||
urn = (protection.get("schemeIdUri") or "").lower()
|
urn = (protection.get("schemeIdUri") or "").lower()
|
||||||
|
|
||||||
if urn == WidevineCdm.urn:
|
if urn == WidevineCdm.urn:
|
||||||
pssh_text = protection.findtext("pssh")
|
pssh_text = protection.findtext("pssh") or protection.findtext("{urn:mpeg:cenc:2013}pssh")
|
||||||
if not pssh_text:
|
if not pssh_text:
|
||||||
continue
|
continue
|
||||||
pssh = PSSH(pssh_text)
|
pssh = PSSH(pssh_text)
|
||||||
@@ -897,6 +897,7 @@ class DASH:
|
|||||||
elif urn in ("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95", "urn:microsoft:playready"):
|
elif urn in ("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95", "urn:microsoft:playready"):
|
||||||
pr_pssh_b64 = (
|
pr_pssh_b64 = (
|
||||||
protection.findtext("pssh")
|
protection.findtext("pssh")
|
||||||
|
or protection.findtext("{urn:mpeg:cenc:2013}pssh")
|
||||||
or protection.findtext("pro")
|
or protection.findtext("pro")
|
||||||
or protection.findtext("{urn:microsoft:playready}pro")
|
or protection.findtext("{urn:microsoft:playready}pro")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user