Index: webkit/glue/simple_webmimeregistry_impl.cc |
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc |
index f12f48b6c8156fddf624064e3a6cf7a4b9652012..5dd227fa0018d465ea026a096affdee65a56f4a9 100644 |
--- a/webkit/glue/simple_webmimeregistry_impl.cc |
+++ b/webkit/glue/simple_webmimeregistry_impl.cc |
@@ -54,9 +54,28 @@ WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType( |
if (!net::IsSupportedMediaMimeType(ToASCIIOrEmpty(mime_type).c_str())) |
return IsNotSupported; |
+ // Check list of strict codecs to see if it is supported. |
+ if (net::IsStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str())) { |
+ // We support the container, but no codecs were specified. |
+ if (codecs.isNull()) |
+ return MayBeSupported; |
+ |
+ // Check if the codecs are a perfect match. |
+ std::vector<std::string> strict_codecs; |
+ net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), |
+ &strict_codecs, |
+ false); |
+ if (!net::IsSupportedStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str(), |
+ strict_codecs)) |
+ return IsNotSupported; |
+ |
+ // Good to go! |
+ return IsSupported; |
+ } |
+ |
// If we don't recognize the codec, it's possible we support it. |
std::vector<std::string> parsed_codecs; |
- net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs); |
+ net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs, true); |
if (!net::AreSupportedMediaCodecs(parsed_codecs)) |
return MayBeSupported; |