Index: media/mp4/mp4_stream_parser.cc |
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc |
index b8f633131505f6c3eb458853238b4e554726bb75..b661997a083d3f67dabd8ac5614f7eacba4266c4 100644 |
--- a/media/mp4/mp4_stream_parser.cc |
+++ b/media/mp4/mp4_stream_parser.cc |
@@ -154,6 +154,8 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) { |
AudioDecoderConfig audio_config; |
VideoDecoderConfig video_config; |
+ bool is_audio_encrypted = false; |
+ bool is_video_encrypted = false; |
for (std::vector<Track>::const_iterator track = moov_->tracks.begin(); |
track != moov_->tracks.end(); ++track) { |
@@ -198,6 +200,8 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) { |
LOG(ERROR) << "Unsupported audio object type."; |
return false; |
} |
+ |
+ is_audio_encrypted = entry.sinf.info.track_encryption.is_encrypted; |
RCHECK(EmitKeyNeeded(entry.sinf.info.track_encryption)); |
audio_config.Initialize(kCodecAAC, entry.samplesize, |
@@ -219,6 +223,8 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) { |
LOG(ERROR) << "Unsupported video format."; |
return false; |
} |
+ |
+ is_video_encrypted = entry.sinf.info.track_encryption.is_encrypted; |
RCHECK(EmitKeyNeeded(entry.sinf.info.track_encryption)); |
// TODO(strobe): Recover correct crop box |
@@ -237,7 +243,8 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) { |
} |
} |
- RCHECK(config_cb_.Run(audio_config, video_config)); |
+ RCHECK(config_cb_.Run(audio_config, video_config, |
+ is_audio_encrypted, is_video_encrypted)); |
base::TimeDelta duration; |
if (moov_->extends.header.fragment_duration > 0) { |