mirror of
https://github.com/androidx/media.git
synced 2025-05-15 11:39:56 +08:00
Allow unsigned integers in adaptation set id
This commit is contained in:
parent
7996766b22
commit
e06c72ba26
@ -393,7 +393,7 @@ public class DashManifestParser extends DefaultHandler
|
||||
long timeShiftBufferDepthMs,
|
||||
boolean dvbProfileDeclared)
|
||||
throws XmlPullParserException, IOException {
|
||||
int id = parseInt(xpp, "id", AdaptationSet.ID_UNSET);
|
||||
int id = parseUnsignedInt(xpp, "id", AdaptationSet.ID_UNSET);
|
||||
@C.TrackType int contentType = parseContentType(xpp);
|
||||
|
||||
String mimeType = xpp.getAttributeValue(null, "mimeType");
|
||||
@ -1927,6 +1927,11 @@ public class DashManifestParser extends DefaultHandler
|
||||
return text;
|
||||
}
|
||||
|
||||
protected static int parseUnsignedInt(XmlPullParser xpp, String name, int defaultValue) {
|
||||
String value = xpp.getAttributeValue(null, name);
|
||||
return value == null ? defaultValue : Integer.parseUnsignedInt(value);
|
||||
}
|
||||
|
||||
protected static int parseInt(XmlPullParser xpp, String name, int defaultValue) {
|
||||
String value = xpp.getAttributeValue(null, name);
|
||||
return value == null ? defaultValue : Integer.parseInt(value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user