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

Unified Diff: content/renderer/media/cdm/ppapi_decryptor.cc

Issue 2625333003: media: Always provide CdmContext when selecting decoder in DecoderStream (Closed)
Patch Set: rebase only Created 3 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 | « content/renderer/media/cdm/ppapi_decryptor.h ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/cdm/ppapi_decryptor.cc
diff --git a/content/renderer/media/cdm/ppapi_decryptor.cc b/content/renderer/media/cdm/ppapi_decryptor.cc
index 835907cbf2e4ba4671334ea38519d387e292a637..ae9d90ad517cc06095720c5c50c7ea650225aaec 100644
--- a/content/renderer/media/cdm/ppapi_decryptor.cc
+++ b/content/renderer/media/cdm/ppapi_decryptor.cc
@@ -205,7 +205,8 @@ media::CdmContext* PpapiDecryptor::GetCdmContext() {
}
media::Decryptor* PpapiDecryptor::GetDecryptor() {
- return this;
+ base::AutoLock auto_lock(lock_);
+ return had_fatal_plugin_error_ ? nullptr : this;
}
int PpapiDecryptor::GetCdmId() const {
@@ -436,8 +437,12 @@ void PpapiDecryptor::AttemptToResumePlayback() {
}
void PpapiDecryptor::OnFatalPluginError() {
+ DVLOG(1) << __func__;
DCHECK(render_task_runner_->BelongsToCurrentThread());
pepper_cdm_wrapper_.reset();
+
+ base::AutoLock auto_lock(lock_);
+ had_fatal_plugin_error_ = true;
}
ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() {
« no previous file with comments | « content/renderer/media/cdm/ppapi_decryptor.h ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698