Chromium Code Reviews| Index: media/filters/decrypting_video_decoder.cc |
| diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc |
| index 1b541d96231644c33047c5b4e834408bb669d7d6..187cc2e275cb2d3b15bdbf92bdf96cd08dddc5e5 100644 |
| --- a/media/filters/decrypting_video_decoder.cc |
| +++ b/media/filters/decrypting_video_decoder.cc |
| @@ -52,7 +52,6 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| DCHECK(decode_cb_.is_null()); |
| DCHECK(reset_cb_.is_null()); |
| DCHECK(config.IsValidConfig()); |
| - DCHECK(config.is_encrypted()); |
| init_cb_ = BindToCurrentLoop(init_cb); |
| output_cb_ = BindToCurrentLoop(output_cb); |
| @@ -60,6 +59,8 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| config_ = config; |
| if (state_ == kUninitialized) { |
| + // DecoderSelector only chooses |this| when the stream is encrypted. |
|
ddorwin
2017/02/12 04:28:52
ditto
xhwang
2017/02/14 23:59:33
Done.
|
| + DCHECK(config.is_encrypted()); |
| DCHECK(cdm_context); |
| if (!cdm_context->GetDecryptor()) { |
| MEDIA_LOG(DEBUG, media_log_) << GetDisplayName() << ": no decryptor"; |
| @@ -69,7 +70,8 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| decryptor_ = cdm_context->GetDecryptor(); |
| } else { |
| - // Reinitialization. |
| + // Reinitialization (i.e. upon a config change). The new config can be |
| + // encrypted or clear. |
| decryptor_->DeinitializeDecoder(Decryptor::kVideo); |
| } |