Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: media/base/mime_util_internal.cc

Issue 2515553002: Fix mimetype mappings for FLAC support. (Closed)
Patch Set: Fix test deletion during merge. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9053eeed56ad46a72a95200befac601dd86482c9 100644
--- a/media/base/mime_util_internal.cc
+++ b/media/base/mime_util_internal.cc
@@ -408,6 +408,7 @@ void MimeUtil::AddSupportedMediaFormats() {
AddContainerWithCodecs("video/ogg", ogg_codecs, false);
// TODO(ddorwin): Should the application type support Opus?
AddContainerWithCodecs("application/ogg", ogg_codecs, false);
+ AddContainerWithCodecs("audio/flac", implicit_codec, false);
#if defined(USE_PROPRIETARY_CODECS)
AddContainerWithCodecs("audio/mpeg", mp3_codecs, true); // Allow "mp3".
@@ -562,6 +563,7 @@ bool MimeUtil::IsCodecSupportedOnPlatform(
// The remaining codecs may be supported depending on platform abilities.
// ----------------------------------------------------------------------
+ case FLAC:
ddorwin 2016/11/18 00:11:21 Pedantic: This should be after MPEG4_AAC. The othe
DaleCurtis 2016/11/18 00:39:26 Done.
case PCM:
case MP3:
case MPEG4_AAC:
@@ -766,6 +768,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const {
case HEVC:
return true;
+ case FLAC:
ddorwin 2016/11/18 00:11:21 Pedantic: This should be after OPUS.
DaleCurtis 2016/11/18 00:39:26 Done.
case PCM:
case VORBIS:
case OPUS:
@@ -792,6 +795,11 @@ bool MimeUtil::GetDefaultCodecLowerCase(const std::string& mime_type_lower_case,
return true;
}
+ if (mime_type_lower_case == "audio/flac") {
+ *default_codec = MimeUtil::FLAC;
+ return true;
+ }
+
return false;
}

Powered by Google App Engine
This is Rietveld 408576698