mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-05-17 14:29:27 +00:00
fix(drm): pass per-segment PSSH to Widevine license callback
Mirrors the PlayReady fix (fbc4aa2) for Widevine. HLS manifests with per-segment EXT-X-KEY changes generate distinct PSSH per segment, so service callbacks building the license URI from cached track-level PSSH can mismatch the challenge KID and trigger CEKNotFound. Forward pssh from the active DRM and fall back to the legacy single-arg call when a service hasn't adopted the kwarg.
This commit is contained in:
@@ -205,7 +205,11 @@ class Widevine:
|
|||||||
if hasattr(cdm, "has_cached_keys") and cdm.has_cached_keys(session_id):
|
if hasattr(cdm, "has_cached_keys") and cdm.has_cached_keys(session_id):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
cdm.parse_license(session_id, licence(challenge=challenge))
|
try:
|
||||||
|
license_res = licence(challenge=challenge, pssh=self.pssh)
|
||||||
|
except TypeError:
|
||||||
|
license_res = licence(challenge=challenge)
|
||||||
|
cdm.parse_license(session_id, license_res)
|
||||||
|
|
||||||
self.content_keys = {key.kid: key.key.hex() for key in cdm.get_keys(session_id, "CONTENT")}
|
self.content_keys = {key.kid: key.key.hex() for key in cdm.get_keys(session_id, "CONTENT")}
|
||||||
if not self.content_keys:
|
if not self.content_keys:
|
||||||
|
|||||||
Reference in New Issue
Block a user