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

Unified Diff: media/filters/decrypting_video_decoder.cc

Issue 2543623003: media: Allow config change between clear and encrypted streams (Closed)
Patch Set: media: Allow config change between clear and encrypted streams Created 4 years 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/filters/decrypting_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index 1b541d96231644c33047c5b4e834408bb669d7d6..fe4c0d326de5ab2fa4a6d461936fa94b5a129ccc 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,7 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config,
config_ = config;
if (state_ == kUninitialized) {
+ DCHECK(config.is_encrypted());
ddorwin 2016/12/05 23:53:04 Comment/TODO
DCHECK(cdm_context);
if (!cdm_context->GetDecryptor()) {
MEDIA_LOG(DEBUG, media_log_) << GetDisplayName() << ": no decryptor";
@@ -69,7 +69,7 @@ void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config,
decryptor_ = cdm_context->GetDecryptor();
} else {
- // Reinitialization.
+ // Reinitialization. |config| can be encrypted or clear.
ddorwin 2016/12/05 23:53:04 Note that this is a separate thought. (Context: Ea
xhwang 2016/12/16 20:12:28 Done.
decryptor_->DeinitializeDecoder(Decryptor::kVideo);
}

Powered by Google App Engine
This is Rietveld 408576698