Cdm: Clear context for the challenge once loaded
This stops users from loading the license twice, which wouldn't do anything wrong, but without doing this context deletion we could possibly end up with a ton of memory that would likely go unused if the same Cdm session is used a lot for a long time.
This commit is contained in:
parent
d744ed4c90
commit
e36411cfaf
|
@ -256,6 +256,9 @@ class Cdm:
|
||||||
"""
|
"""
|
||||||
Load Keys from a License Message from a License Server Response.
|
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:
|
Parameters:
|
||||||
session_id: Session identifier.
|
session_id: Session identifier.
|
||||||
license_message: A SignedMessage containing a License message.
|
license_message: A SignedMessage containing a License message.
|
||||||
|
@ -327,6 +330,8 @@ class Cdm:
|
||||||
for key in licence.key
|
for key in licence.key
|
||||||
]
|
]
|
||||||
|
|
||||||
|
del session.context[licence.id.request_id]
|
||||||
|
|
||||||
def decrypt(
|
def decrypt(
|
||||||
self,
|
self,
|
||||||
session_id: bytes,
|
session_id: bytes,
|
||||||
|
|
Loading…
Reference in New Issue