diff --git a/media/base/supported_types.cc b/media/base/supported_types.cc index 07b991932aad5..ce458ba45e494 100644 --- a/media/base/supported_types.cc +++ b/media/base/supported_types.cc @@ -209,33 +209,7 @@ bool IsAudioCodecProprietary(AudioCodec codec) { #endif // !BUILDFLAG(USE_PROPRIETARY_CODECS) bool IsHevcProfileSupported(const VideoType& type) { - if (!IsColorSpaceSupported(type.color_space)) - return false; - -#if BUILDFLAG(ENABLE_PLATFORM_HEVC) -#if BUILDFLAG(PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT) -#if BUILDFLAG(IS_CHROMEOS_LACROS) - // TODO(b/171813538): For Lacros, the supplemental profile cache will be - // asking lacros-gpu, but we will be doing decoding in ash-gpu. Until the - // codec detection is plumbed through to ash-gpu we can do this extra check - // for HEVC support. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kLacrosEnablePlatformHevc)) { - return true; - } -#endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS_ASH) - if (!base::FeatureList::IsEnabled(kPlatformHEVCDecoderSupport)) { - return false; - } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) - return GetSupplementalProfileCache()->IsProfileSupported(type.profile); -#else - return true; -#endif // BUIDFLAG(PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT) -#else - return false; -#endif // BUILDFLAG(ENABLE_PLATFORM_HEVC) + return true; } bool IsVp9ProfileSupported(const VideoType& type) { @@ -410,7 +384,7 @@ bool IsBuiltInVideoCodec(VideoCodec codec) { if (codec == VideoCodec::kVP8) return true; #if BUILDFLAG(USE_PROPRIETARY_CODECS) - if (codec == VideoCodec::kH264) + if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) return true; #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) #endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 65c7a4958bd95..c1ea63c18ee87 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -136,6 +136,10 @@ AVCodecID AudioCodecToCodecID(AudioCodec audio_codec, switch (audio_codec) { case AudioCodec::kAAC: return AV_CODEC_ID_AAC; + case AudioCodec::kAC3: + return AV_CODEC_ID_AC3; + case AudioCodec::kEAC3: + return AV_CODEC_ID_EAC3; case AudioCodec::kALAC: return AV_CODEC_ID_ALAC; case AudioCodec::kMP3: