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

Unified Diff: media/base/android/media_source_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 | « media/base/android/media_codec_player.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index 84c0b43bec05179a924d62abf943deeb89142e95..133e5f71c6c8def3e7ce0ab52758807baf055929 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -74,6 +74,10 @@ MediaSourcePlayer::~MediaSourcePlayer() {
Release();
DCHECK_EQ(!cdm_, !cdm_registration_id_);
if (cdm_) {
+ // Cancel previously registered callback (if any).
+ static_cast<MediaDrmBridge*>(cdm_.get())
+ ->SetMediaCryptoReadyCB(MediaDrmBridge::MediaCryptoReadyCB());
+
static_cast<MediaDrmBridge*>(cdm_.get())
->UnregisterPlayer(cdm_registration_id_);
cdm_registration_id_ = 0;
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698