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

Unified Diff: media/filters/decrypting_demuxer_stream.cc

Issue 2701203003: media: Prefer decrypting pipeline when CDM is attached (Closed)
Patch Set: comments addressed Created 3 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 | « media/filters/decrypting_audio_decoder_unittest.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_demuxer_stream.cc
diff --git a/media/filters/decrypting_demuxer_stream.cc b/media/filters/decrypting_demuxer_stream.cc
index aa8498abb46bfa861d7bc4a5298863d7c895cd48..d86355526599596ba213f24ede481ada7b69d6d9 100644
--- a/media/filters/decrypting_demuxer_stream.cc
+++ b/media/filters/decrypting_demuxer_stream.cc
@@ -373,28 +373,21 @@ void DecryptingDemuxerStream::InitializeDecoderConfig() {
// The decoder selector or upstream demuxer make sure the stream is valid.
DCHECK(IsStreamValid(demuxer_stream_));
+ // Since |this| is a decrypted version of |demuxer_stream_|, the decoder
+ // config of |this| should always be a decrypted version of |demuxer_stream_|
+ // configs.
switch (demuxer_stream_->type()) {
case AUDIO: {
- AudioDecoderConfig input_audio_config =
- demuxer_stream_->audio_decoder_config();
- audio_config_.Initialize(
- input_audio_config.codec(), input_audio_config.sample_format(),
- input_audio_config.channel_layout(),
- input_audio_config.samples_per_second(),
- input_audio_config.extra_data(), Unencrypted(),
- input_audio_config.seek_preroll(), input_audio_config.codec_delay());
+ audio_config_ = demuxer_stream_->audio_decoder_config();
+ if (audio_config_.is_encrypted())
+ audio_config_.SetIsEncrypted(false);
break;
}
case VIDEO: {
- VideoDecoderConfig input_video_config =
- demuxer_stream_->video_decoder_config();
- video_config_.Initialize(
- input_video_config.codec(), input_video_config.profile(),
- input_video_config.format(), input_video_config.color_space(),
- input_video_config.coded_size(), input_video_config.visible_rect(),
- input_video_config.natural_size(), input_video_config.extra_data(),
- Unencrypted());
+ video_config_ = demuxer_stream_->video_decoder_config();
+ if (video_config_.is_encrypted())
+ video_config_.SetIsEncrypted(false);
break;
}
« no previous file with comments | « media/filters/decrypting_audio_decoder_unittest.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698