| Index: media/formats/mp4/mp4_stream_parser.cc
|
| diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
|
| index 1926d1fe9a5526361df6d3f201891b4307418546..3dd4ce3fd4ef7d17b3cf64448f5cc9c5ccc73fd3 100644
|
| --- a/media/formats/mp4/mp4_stream_parser.cc
|
| +++ b/media/formats/mp4/mp4_stream_parser.cc
|
| @@ -318,6 +318,11 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
|
| codec, sample_format, channel_layout, sample_per_second, extra_data,
|
| is_audio_track_encrypted_ ? AesCtrEncryptionScheme() : Unencrypted(),
|
| base::TimeDelta(), 0);
|
| + if (!audio_config.IsValidConfig()) {
|
| + MEDIA_LOG(ERROR, media_log_) << "Invalid audio decoder config: "
|
| + << audio_config.AsHumanReadableString();
|
| + return false;
|
| + }
|
| has_audio_ = true;
|
| audio_track_id_ = track->header.track_id;
|
| media_tracks->AddAudioTrack(audio_config, audio_track_id_, "main",
|
| @@ -369,6 +374,11 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
|
| // SPS/PPS are embedded in the video stream
|
| EmptyExtraData(),
|
| is_video_track_encrypted_ ? AesCtrEncryptionScheme() : Unencrypted());
|
| + if (!video_config.IsValidConfig()) {
|
| + MEDIA_LOG(ERROR, media_log_) << "Invalid video decoder config: "
|
| + << video_config.AsHumanReadableString();
|
| + return false;
|
| + }
|
| has_video_ = true;
|
| video_track_id_ = track->header.track_id;
|
| media_tracks->AddVideoTrack(video_config, video_track_id_, "main",
|
|
|