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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1102363005: Initialize the CDM asynchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create() changes Created 5 years, 8 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
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index e8eec4c5ef6217d98b8667e427f7d1d57b936d17..15829106aade764d2cdb00544d5cef8be89fea80 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -699,7 +699,10 @@ void WebMediaPlayerImpl::OnWaitingForDecryptionKey() {
void WebMediaPlayerImpl::SetCdm(const CdmAttachedCB& cdm_attached_cb,
CdmContext* cdm_context) {
- pipeline_.SetCdm(cdm_context, cdm_attached_cb);
+ // The CDM may fail to create, so no need to tell the pipeline that a CDM
ddorwin 2015/05/04 22:46:02 nit: // If CDM initialization failed, there is no
jrummell 2015/05/05 00:54:17 Done.
+ // is attached.
+ if (cdm_context)
+ pipeline_.SetCdm(cdm_context, cdm_attached_cb);
}
void WebMediaPlayerImpl::OnCdmAttached(

Powered by Google App Engine
This is Rietveld 408576698