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

Unified Diff: media/filters/source_buffer_stream.cc

Issue 10910293: Add is_encrypted() in VideoDecoderConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments. Created 8 years, 3 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
Index: media/filters/source_buffer_stream.cc
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index 478b7d5d274feec7d66d72b67e995368b237edf0..de1a9c943c5c0fb50f42c1dc52ad15721599f429 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -940,6 +940,11 @@ bool SourceBufferStream::UpdateVideoConfig(const VideoDecoderConfig& config) {
DCHECK(!video_configs_.empty());
DCHECK(audio_configs_.empty());
+ if (video_configs_[0]->is_encrypted() != config.is_encrypted()) {
+ DVLOG(1) << "UpdateVideoConfig() : Encryption changes not allowed.";
+ return false;
+ }
+
if (video_configs_[0]->codec() != config.codec()) {
DVLOG(1) << "UpdateVideoConfig() : Codec changes not allowed.";
return false;

Powered by Google App Engine
This is Rietveld 408576698