diff options
Diffstat (limited to 'chromium/media/formats/mp4/box_definitions.cc')
-rw-r--r-- | chromium/media/formats/mp4/box_definitions.cc | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/chromium/media/formats/mp4/box_definitions.cc b/chromium/media/formats/mp4/box_definitions.cc index c1c9934ccc4..7e581bc6e2c 100644 --- a/chromium/media/formats/mp4/box_definitions.cc +++ b/chromium/media/formats/mp4/box_definitions.cc @@ -587,12 +587,13 @@ bool AVCDecoderConfigurationRecord::Parse(BoxReader* reader) { bool AVCDecoderConfigurationRecord::Parse(const uint8_t* data, int data_size) { BufferReader reader(data, data_size); - return ParseInternal(&reader, new MediaLog()); + // TODO(wolenetz): Questionable MediaLog usage, http://crbug.com/712310 + MediaLog media_log; + return ParseInternal(&reader, &media_log); } -bool AVCDecoderConfigurationRecord::ParseInternal( - BufferReader* reader, - const scoped_refptr<MediaLog>& media_log) { +bool AVCDecoderConfigurationRecord::ParseInternal(BufferReader* reader, + MediaLog* media_log) { RCHECK(reader->Read1(&version) && version == 1 && reader->Read1(&profile_indication) && reader->Read1(&profile_compatibility) && @@ -803,21 +804,16 @@ bool VideoSampleEntry::Parse(BoxReader* reader) { } #endif // BUILDFLAG(ENABLE_HEVC_DEMUXING) #endif // BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING) - case FOURCC_VP09: - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableVp9InMp4)) { - DVLOG(2) << __func__ << " parsing VPCodecConfigurationRecord (vpcC)"; - std::unique_ptr<VPCodecConfigurationRecord> vp_config( - new VPCodecConfigurationRecord()); - RCHECK(reader->ReadChild(vp_config.get())); - frame_bitstream_converter = nullptr; - video_codec = kCodecVP9; - video_codec_profile = vp_config->profile; - } else { - MEDIA_LOG(ERROR, reader->media_log()) << "VP9 in MP4 is not enabled."; - return false; - } + case FOURCC_VP09: { + DVLOG(2) << __func__ << " parsing VPCodecConfigurationRecord (vpcC)"; + std::unique_ptr<VPCodecConfigurationRecord> vp_config( + new VPCodecConfigurationRecord()); + RCHECK(reader->ReadChild(vp_config.get())); + frame_bitstream_converter = nullptr; + video_codec = kCodecVP9; + video_codec_profile = vp_config->profile; break; + } default: // Unknown/unsupported format MEDIA_LOG(ERROR, reader->media_log()) << __func__ @@ -847,10 +843,8 @@ bool VideoSampleEntry::IsFormatValid() const { case FOURCC_DVA1: case FOURCC_DVAV: #endif // BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING) - return true; case FOURCC_VP09: - return base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableVp9InMp4); + return true; default: return false; } |