Parse audioChannels only when on mpeg-dash

Only parse the @value as Int when the schemeIdUri is urn:mpeg:dash:23003:3:audio_channel_configuration:2011
This commit is contained in:
Miquel Beltran 2015-09-18 11:48:34 +02:00
parent d7697176ed
commit ff6455aadb

View File

@ -590,7 +590,10 @@ public class MediaPresentationDescriptionParser extends DefaultHandler
protected int parseAudioChannelConfiguration(XmlPullParser xpp) protected int parseAudioChannelConfiguration(XmlPullParser xpp)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
int audioChannels = parseInt(xpp, "value"); int audioChannels = -1;
String schemeIdUri = parseString(xpp, "schemeIdUri", "");
if (schemeIdUri.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011"))
audioChannels = parseInt(xpp, "value");
do { do {
xpp.next(); xpp.next();
} while (!ParserUtil.isEndTag(xpp, "AudioChannelConfiguration")); } while (!ParserUtil.isEndTag(xpp, "AudioChannelConfiguration"));