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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 254983006: Fix: Adding list of supported codecs for MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding check for std::string::npos Created 6 years, 6 months 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 | « content/public/common/assert_matching_enums.cc ('k') | net/base/mime_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 5f9f398fc7633f3468c00d8925551f14be5ac084..6a61d10e324dd66e126449a36f76a5eeab54dca4 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -428,8 +428,7 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::supportsMediaMIMEType(
std::string key_system_ascii =
GetUnprefixedKeySystemName(base::UTF16ToASCII(key_system));
std::vector<std::string> strict_codecs;
- bool strip_suffix = !net::IsStrictMediaMimeType(mime_type_ascii);
- net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, strip_suffix);
+ net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, true);
if (!IsSupportedKeySystemWithMediaMimeType(
mime_type_ascii, strict_codecs, key_system_ascii)) {
@@ -444,14 +443,8 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::supportsMediaMIMEType(
// Check if the codecs are a perfect match.
std::vector<std::string> strict_codecs;
net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false);
- if (net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs))
- return IsSupported;
-
- // We support the container, but no codecs were specified.
- if (codecs.isNull())
- return MayBeSupported;
-
- return IsNotSupported;
+ return static_cast<WebMimeRegistry::SupportsType> (
+ net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs));
}
// If we don't recognize the codec, it's possible we support it.
« no previous file with comments | « content/public/common/assert_matching_enums.cc ('k') | net/base/mime_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698