Skip to content
Permalink
Browse files

Call UninitializeContext on locally allocated instance

  • Loading branch information...
svdmaar committed May 2, 2019
1 parent bcd33c5 commit dbdecd516d6c98b0da9de41c0e210219ab9bb558
Showing with 4 additions and 1 deletion.
  1. +4 −1 MediaSystem.cpp
@@ -120,8 +120,11 @@ class PlayReady : public IMediaKeys, public IMediaKeysExt {
}

CDMi_RESULT DestroyMediaKeySession(IMediaKeySession *f_piMediaKeySession) {
MediaKeySession * mediaKeySession = dynamic_cast<MediaKeySession *>(f_piMediaKeySession);
ASSERT((mediaKeySession != nullptr) && "Expected a locally allocated MediaKeySession");

f_piMediaKeySession->UninitializeContext();
// TODO: is this call still needed? Can't we move it to the destructor?
mediaKeySession->UninitializeContext();
delete f_piMediaKeySession;

return CDMi_SUCCESS;

0 comments on commit dbdecd5

Please sign in to comment.
You can’t perform that action at this time.