mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
resolve #1095 store the language as normalised attribute so we can access it from the track parser
This commit is contained in:
parent
19cf24234c
commit
d5425bb64a
1 changed files with 2 additions and 1 deletions
|
|
@ -543,6 +543,7 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
|
||||||
displayWidth = parseInt(parser, KEY_DISPLAY_WIDTH, -1);
|
displayWidth = parseInt(parser, KEY_DISPLAY_WIDTH, -1);
|
||||||
displayHeight = parseInt(parser, KEY_DISPLAY_HEIGHT, -1);
|
displayHeight = parseInt(parser, KEY_DISPLAY_HEIGHT, -1);
|
||||||
language = parser.getAttributeValue(null, KEY_LANGUAGE);
|
language = parser.getAttributeValue(null, KEY_LANGUAGE);
|
||||||
|
putNormalizedAttribute(KEY_LANGUAGE, language);
|
||||||
timescale = parseInt(parser, KEY_TIME_SCALE, -1);
|
timescale = parseInt(parser, KEY_TIME_SCALE, -1);
|
||||||
if (timescale == -1) {
|
if (timescale == -1) {
|
||||||
timescale = (Long) getNormalizedAttribute(KEY_TIME_SCALE);
|
timescale = (Long) getNormalizedAttribute(KEY_TIME_SCALE);
|
||||||
|
|
@ -634,12 +635,12 @@ public class SmoothStreamingManifestParser implements UriLoadable.Parser<SmoothS
|
||||||
// If fourCC is missing and the stream type is audio, we assume AAC.
|
// If fourCC is missing and the stream type is audio, we assume AAC.
|
||||||
mimeType = fourCC != null ? fourCCToMimeType(fourCC)
|
mimeType = fourCC != null ? fourCCToMimeType(fourCC)
|
||||||
: type == StreamElement.TYPE_AUDIO ? MimeTypes.AUDIO_AAC : null;
|
: type == StreamElement.TYPE_AUDIO ? MimeTypes.AUDIO_AAC : null;
|
||||||
language = (String) getNormalizedAttribute(KEY_LANGUAGE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == StreamElement.TYPE_AUDIO) {
|
if (type == StreamElement.TYPE_AUDIO) {
|
||||||
samplingRate = parseRequiredInt(parser, KEY_SAMPLING_RATE);
|
samplingRate = parseRequiredInt(parser, KEY_SAMPLING_RATE);
|
||||||
channels = parseRequiredInt(parser, KEY_CHANNELS);
|
channels = parseRequiredInt(parser, KEY_CHANNELS);
|
||||||
|
language = (String) getNormalizedAttribute(KEY_LANGUAGE);
|
||||||
} else {
|
} else {
|
||||||
samplingRate = -1;
|
samplingRate = -1;
|
||||||
channels = -1;
|
channels = -1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue