Index: media/base/mime_util_internal.cc |
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc |
index 11a763e74ab3c0054e6a39db8a3bcdbac462b19b..70faa9c6043a1e0d61c269279e94425a712937e8 100644 |
--- a/media/base/mime_util_internal.cc |
+++ b/media/base/mime_util_internal.cc |
@@ -33,6 +33,7 @@ struct CodecIDMappings { |
// The "mp4a" strings come from RFC 6381. |
static const CodecIDMappings kUnambiguousCodecStringMap[] = { |
{"1", MimeUtil::PCM}, // We only allow this for WAV so it isn't ambiguous. |
+ {"flac", MimeUtil::FLAC}, |
// avc1/avc3.XXXXXX may be unambiguous; handled by ParseAVCCodecId(). |
// hev1/hvc1.XXXXXX may be unambiguous; handled by ParseHEVCCodecID(). |
// vp9, vp9.0, vp09.xx.xx.xx.xx.xx.xx.xx may be unambiguous; handled by |
@@ -366,6 +367,9 @@ void MimeUtil::AddSupportedMediaFormats() { |
CodecSet webm_codecs(webm_audio_codecs); |
webm_codecs.insert(webm_video_codecs.begin(), webm_video_codecs.end()); |
+ CodecSet flac_audio_codecs; |
+ flac_audio_codecs.insert(FLAC); |
+ |
#if defined(USE_PROPRIETARY_CODECS) |
CodecSet mp3_codecs; |
mp3_codecs.insert(MP3); |
@@ -409,6 +413,10 @@ void MimeUtil::AddSupportedMediaFormats() { |
// TODO(ddorwin): Should the application type support Opus? |
AddContainerWithCodecs("application/ogg", ogg_codecs, false); |
+ AddContainerWithCodecs("audio/flac", flac_audio_codecs, false); |
+ AddContainerWithCodecs("audio/x-flac", flac_audio_codecs, false); |
+ AddContainerWithCodecs("application/x-flac", flac_audio_codecs, false); |
servolk
2016/09/23 22:17:15
Firefox supports all 3 mime types (https://reviewb
|
+ |
#if defined(USE_PROPRIETARY_CODECS) |
AddContainerWithCodecs("audio/mpeg", mp3_codecs, true); // Allow "mp3". |
AddContainerWithCodecs("audio/mp3", implicit_codec, true); |
@@ -562,6 +570,7 @@ bool MimeUtil::IsCodecSupportedOnPlatform( |
// The remaining codecs may be supported depending on platform abilities. |
// ---------------------------------------------------------------------- |
+ case FLAC: |
case PCM: |
case MP3: |
case MPEG4_AAC: |
@@ -766,6 +775,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const { |
case HEVC: |
return true; |
+ case FLAC: |
case PCM: |
case VORBIS: |
case OPUS: |