diff options
author | sandersd <sandersd@chromium.org> | 2015-03-25 20:47:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-26 03:47:44 +0000 |
commit | 412f817abb0ee72dc14b21d92edda13fc1bc8b43 (patch) | |
tree | 83d8485fb47e7f71341979173ef9771057610594 | |
parent | 91dd3606d627036287f32bb449b09c170a0765cf (diff) | |
download | chromium_src-412f817abb0ee72dc14b21d92edda13fc1bc8b43.zip chromium_src-412f817abb0ee72dc14b21d92edda13fc1bc8b43.tar.gz chromium_src-412f817abb0ee72dc14b21d92edda13fc1bc8b43.tar.bz2 |
Fix encrypted-media-requestmediakeysystemaccess Layout Test.
BUG=470754
Review URL: https://codereview.chromium.org/1036513007
Cr-Commit-Position: refs/heads/master@{#322310}
-rw-r--r-- | media/blink/webencryptedmediaclient_impl.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/media/blink/webencryptedmediaclient_impl.cc b/media/blink/webencryptedmediaclient_impl.cc index a0cc0d0..ccd44fb 100644 --- a/media/blink/webencryptedmediaclient_impl.cc +++ b/media/blink/webencryptedmediaclient_impl.cc @@ -136,8 +136,9 @@ static bool IsSupportedContentType( // parameters can be rejected. http://crbug.com/417561 std::string container_lower = base::StringToLowerASCII(container_mime_type); - // Check that |codecs| are supported by the CDM. This check does not handle - // extended codecs, so extended codec information is stripped. + // Check that |container_mime_type| and |codecs| are supported by the CDM. + // This check does not handle extended codecs, so extended codec information + // is stripped. std::vector<std::string> codec_vector; net::ParseCodecString(codecs, &codec_vector, true); if (!key_systems.IsSupportedCodecCombination( @@ -145,11 +146,13 @@ static bool IsSupportedContentType( return false; } + if (codec_vector.empty()) + return true; + // Check that |codecs| are supported by Chrome. This is done primarily to // validate extended codecs, but it also ensures that the CDM cannot support - // codecs that Chrome does not (which would be bad because it would require - // considering the accumulated configuration, and could affect whether secure - // decode is required). + // codecs that Chrome does not (which could complicate the robustness + // algorithm). codec_vector.clear(); net::ParseCodecString(codecs, &codec_vector, false); return (net::IsSupportedStrictMediaMimeType(container_lower, codec_vector) == |