Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: media/base/android/media_codec_player.cc

Issue 1601743007: media: Cancel MediaCryptoReadyCB during player destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_player.cc
diff --git a/media/base/android/media_codec_player.cc b/media/base/android/media_codec_player.cc
index 565c7452c3a5d392796552680f33d7cd82108c6d..3b316f5dec12aea3862ba06ec7f571fc6fa03b8c 100644
--- a/media/base/android/media_codec_player.cc
+++ b/media/base/android/media_codec_player.cc
@@ -102,6 +102,10 @@ MediaCodecPlayer::~MediaCodecPlayer()
audio_decoder_->ReleaseDecoderResources();
if (cdm_) {
+ // Cancel previously registered callback (if any).
+ static_cast<MediaDrmBridge*>(cdm_.get())
+ ->SetMediaCryptoReadyCB(MediaDrmBridge::MediaCryptoReadyCB());
+
DCHECK(cdm_registration_id_);
static_cast<MediaDrmBridge*>(cdm_.get())
->UnregisterPlayer(cdm_registration_id_);
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698