diff --git a/pywidevine/cdm.py b/pywidevine/cdm.py index c962b37..fc00502 100644 --- a/pywidevine/cdm.py +++ b/pywidevine/cdm.py @@ -256,6 +256,9 @@ class Cdm: """ Load Keys from a License Message from a License Server Response. + License Messages can only be loaded a single time. An InvalidContext error will + be raised if you attempt to parse a License Message more than once. + Parameters: session_id: Session identifier. license_message: A SignedMessage containing a License message. @@ -327,6 +330,8 @@ class Cdm: for key in licence.key ] + del session.context[licence.id.request_id] + def decrypt( self, session_id: bytes,