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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp

Issue 2731743003: [eme] Ignore capabilities with unrecognized parameters (Closed)
Patch Set: improve comments Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
index b85a831cd86bb46dab197716abd4f166b1a3a6c3..8160ba42fa3110e03633224395df6f5309bde71f 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
@@ -53,10 +53,16 @@ static WebVector<WebMediaKeySystemMediaCapability> convertCapabilities(
result[i].contentType = contentType;
ParsedContentType type(contentType);
if (type.isValid()) {
- // FIXME: Fail if there are unrecognized parameters.
- // http://crbug.com/690131
+ // From
+ // http://w3c.github.io/encrypted-media/#get-supported-capabilities-for-audio-video-type
+ // "If the user agent does not recognize one or more parameters,
+ // continue to the next iteration." There is no way to enumerate the
+ // parameters, so only look up "codecs" if a single parameter is
+ // present. Chromium expects "codecs" to be provided, so this capability
+ // will be skipped if codecs is not the only parameter specified.
result[i].mimeType = type.mimeType();
- result[i].codecs = type.parameterValueForName("codecs");
+ if (type.parameterCount() == 1u)
+ result[i].codecs = type.parameterValueForName("codecs");
}
result[i].robustness = capabilities[i].robustness();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-requestmediakeysystemaccess.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698