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

Unified Diff: media/base/mime_util_internal.cc

Issue 2515553002: Fix mimetype mappings for FLAC support. (Closed)
Patch Set: Comments. 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
« no previous file with comments | « media/base/mime_util_internal.h ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9c052c5c0803049fac547150769460cefe665a20 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".
@@ -565,6 +566,7 @@ bool MimeUtil::IsCodecSupportedOnPlatform(
case PCM:
case MP3:
case MPEG4_AAC:
+ case FLAC:
case VORBIS:
// These codecs are always supported; via a platform decoder (when used
// with MSE/EME), a software decoder (the unified pipeline), or with
@@ -769,6 +771,7 @@ bool MimeUtil::IsCodecProprietary(Codec codec) const {
case PCM:
case VORBIS:
case OPUS:
+ case FLAC:
case VP8:
case VP9:
case THEORA:
@@ -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;
}
« no previous file with comments | « media/base/mime_util_internal.h ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698