Relax string comparison in DASH parseContentProtection
... by making it case insensitive and null-tolerant for schemeId (as was before adding playlist drm data merging). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=174472123
This commit is contained in:
parent
1cfea62545
commit
ecaaed9674
@ -345,13 +345,14 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
*/
|
*/
|
||||||
protected Pair<String, SchemeData> parseContentProtection(XmlPullParser xpp)
|
protected Pair<String, SchemeData> parseContentProtection(XmlPullParser xpp)
|
||||||
throws XmlPullParserException, IOException {
|
throws XmlPullParserException, IOException {
|
||||||
String schemeIdUri = xpp.getAttributeValue(null, "schemeIdUri");
|
|
||||||
String schemeType = null;
|
String schemeType = null;
|
||||||
byte[] data = null;
|
byte[] data = null;
|
||||||
UUID uuid = null;
|
UUID uuid = null;
|
||||||
boolean requiresSecureDecoder = false;
|
boolean requiresSecureDecoder = false;
|
||||||
|
|
||||||
switch (schemeIdUri) {
|
String schemeIdUri = xpp.getAttributeValue(null, "schemeIdUri");
|
||||||
|
if (schemeIdUri != null) {
|
||||||
|
switch (schemeIdUri.toLowerCase()) {
|
||||||
case "urn:mpeg:dash:mp4protection:2011":
|
case "urn:mpeg:dash:mp4protection:2011":
|
||||||
schemeType = xpp.getAttributeValue(null, "value");
|
schemeType = xpp.getAttributeValue(null, "value");
|
||||||
String defaultKid = xpp.getAttributeValue(null, "cenc:default_KID");
|
String defaultKid = xpp.getAttributeValue(null, "cenc:default_KID");
|
||||||
@ -370,6 +371,7 @@ public class DashManifestParser extends DefaultHandler
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
xpp.next();
|
xpp.next();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user