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

Unified Diff: media/filters/decoder_stream.cc

Issue 1447533006: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/filters/decoder_selector.cc ('k') | media/filters/decoder_stream_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.cc
diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc
index 91a5b1e139cfa80b7e4fca466dc65555a4f697b8..772f1266220b9a452680c4555dc3a92531fca2c8 100644
--- a/media/filters/decoder_stream.cc
+++ b/media/filters/decoder_stream.cc
@@ -516,8 +516,9 @@ void DecoderStream<StreamType>::ReinitializeDecoder() {
DCHECK_EQ(pending_decode_requests_, 0);
state_ = STATE_REINITIALIZING_DECODER;
+ // Decoders should not need CDMs during reinitialization.
DecoderStreamTraits<StreamType>::InitializeDecoder(
- decoder_.get(), stream_,
+ decoder_.get(), stream_, SetCdmReadyCB(),
base::Bind(&DecoderStream<StreamType>::OnDecoderReinitialized,
weak_factory_.GetWeakPtr()),
base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady,
@@ -540,8 +541,8 @@ void DecoderStream<StreamType>::OnDecoderReinitialized(bool success) {
// Reinitialization failed. Try to fall back to one of the remaining
// decoders. This will consume at least one decoder so doing it more than
// once is safe.
- // For simplicity, don't attempt to fall back to a decryptor. Calling this
- // with a null callback ensures that one won't be selected.
+ // For simplicity, don't attempt to fall back to a decrypting decoder.
+ // Calling this with a null callback ensures that one won't be selected.
SelectDecoder(SetCdmReadyCB());
} else {
CompleteDecoderReinitialization(true);
« no previous file with comments | « media/filters/decoder_selector.cc ('k') | media/filters/decoder_stream_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698