| 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 2c8d6d7e7033a577415e43b66bb51f6bd20a1b19..f9c6eff5ff983823d1f42a77a409cab948768681 100644
|
| --- a/media/formats/mp4/mp4_stream_parser.cc
|
| +++ b/media/formats/mp4/mp4_stream_parser.cc
|
| @@ -509,13 +509,16 @@ bool MP4StreamParser::EnqueueSample(BufferQueue* audio_buffers,
|
|
|
| std::vector<uint8_t> frame_buf(buf, buf + runs_->sample_size());
|
| if (video) {
|
| - DCHECK(runs_->video_description().frame_bitstream_converter);
|
| - if (!runs_->video_description().frame_bitstream_converter->ConvertFrame(
|
| - &frame_buf, runs_->is_keyframe(), &subsamples)) {
|
| - MEDIA_LOG(ERROR, media_log_)
|
| - << "Failed to prepare video sample for decode";
|
| - *err = true;
|
| - return false;
|
| + if (runs_->video_description().video_codec == kCodecH264 ||
|
| + runs_->video_description().video_codec == kCodecHEVC) {
|
| + DCHECK(runs_->video_description().frame_bitstream_converter);
|
| + if (!runs_->video_description().frame_bitstream_converter->ConvertFrame(
|
| + &frame_buf, runs_->is_keyframe(), &subsamples)) {
|
| + MEDIA_LOG(ERROR, media_log_)
|
| + << "Failed to prepare video sample for decode";
|
| + *err = true;
|
| + return false;
|
| + }
|
| }
|
| }
|
|
|
|
|