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

Unified Diff: media/webm/webm_stream_parser.cc

Issue 10910293: Add is_encrypted() in VideoDecoderConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« media/filters/chunk_demuxer.cc ('K') | « media/mp4/mp4_stream_parser_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_stream_parser.cc
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index db990cd408a7f8033c3cca1d2be623e5576e5d52..8b4630d4733bdcdb1a4a4ac58f0701768eb742ff 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -352,14 +352,20 @@ int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) {
return -1;
}
+ // TODO(xhwang): Support decryption of audio (see http://crbug.com/123421).
+ bool is_audio_encrypted = false;
+ bool is_video_encrypted = !tracks_parser.video_encryption_key_id().empty();
+
if (!config_cb_.Run(config_helper.audio_config(),
- config_helper.video_config())) {
+ config_helper.video_config(),
+ is_audio_encrypted,
+ is_video_encrypted)) {
DVLOG(1) << "New config data isn't allowed.";
return -1;
}
// TODO(xhwang): Support decryption of audio (see http://crbug.com/123421).
- if (!tracks_parser.video_encryption_key_id().empty()) {
+ if (is_video_encrypted) {
std::string key_id = tracks_parser.video_encryption_key_id();
int key_id_size = key_id.size();
CHECK_GT(key_id_size, 0);
« media/filters/chunk_demuxer.cc ('K') | « media/mp4/mp4_stream_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698