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

Unified Diff: media/filters/decrypting_audio_decoder.cc

Issue 167333004: Encrypted Media: No need to cancel NewKeyCB during tear down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 10 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/filters/decrypting_audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_audio_decoder.cc
diff --git a/media/filters/decrypting_audio_decoder.cc b/media/filters/decrypting_audio_decoder.cc
index b3114468d441fce8324cd6156c8e0f0deb07ec9e..a96c9dba0c5f92c89184a231d512ce93be5657e3 100644
--- a/media/filters/decrypting_audio_decoder.cc
+++ b/media/filters/decrypting_audio_decoder.cc
@@ -154,7 +154,6 @@ void DecryptingAudioDecoder::Stop(const base::Closure& closure) {
weak_factory_.InvalidateWeakPtrs();
if (decryptor_) {
- decryptor_->RegisterNewKeyCB(Decryptor::kAudio, Decryptor::NewKeyCB());
decryptor_->DeinitializeDecoder(Decryptor::kAudio);
decryptor_ = NULL;
}
@@ -248,8 +247,9 @@ void DecryptingAudioDecoder::FinishInitialization(bool success) {
UpdateDecoderConfig();
decryptor_->RegisterNewKeyCB(
- Decryptor::kAudio, BindToCurrentLoop(base::Bind(
- &DecryptingAudioDecoder::OnKeyAdded, weak_this_)));
+ Decryptor::kAudio,
+ BindToCurrentLoop(
+ base::Bind(&DecryptingAudioDecoder::OnKeyAdded, weak_this_)));
state_ = kIdle;
base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698