mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Use ParsableBitArray's readString
This commit is contained in:
parent
274743cddc
commit
90601267e6
1 changed files with 2 additions and 6 deletions
|
|
@ -116,9 +116,7 @@ public class AitDecoder implements MetadataDecoder {
|
||||||
if(protocolId == TRANSPORT_PROTOCOL_HTTP) {
|
if(protocolId == TRANSPORT_PROTOCOL_HTTP) {
|
||||||
while (sectionData.getBytePosition() < positionOfNextSection2) {
|
while (sectionData.getBytePosition() < positionOfNextSection2) {
|
||||||
int urlBaseLength = sectionData.readBits(8);
|
int urlBaseLength = sectionData.readBits(8);
|
||||||
byte[] urlBaseByteArray = new byte[urlBaseLength];
|
String urlBase = sectionData.readString(urlBaseLength, Charset.forName("ASCII"));
|
||||||
sectionData.readBytes(urlBaseByteArray, 0, urlBaseLength);
|
|
||||||
String urlBase = new String(urlBaseByteArray, Charset.forName("ASCII"));
|
|
||||||
|
|
||||||
int extensionCount = sectionData.readBits(8);
|
int extensionCount = sectionData.readBits(8);
|
||||||
aitUrlBase = urlBase;
|
aitUrlBase = urlBase;
|
||||||
|
|
@ -129,9 +127,7 @@ public class AitDecoder implements MetadataDecoder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(type == DESCRIPTOR_SIMPLE_APPLICATION_LOCATION) {
|
} else if(type == DESCRIPTOR_SIMPLE_APPLICATION_LOCATION) {
|
||||||
byte[] urlByteArray = new byte[l];
|
String url = sectionData.readString(l, Charset.forName("ASCII"));
|
||||||
sectionData.readBytes(urlByteArray, 0, l);
|
|
||||||
String url = new String(urlByteArray, Charset.forName("ASCII"));
|
|
||||||
aitUrlExtension = url;
|
aitUrlExtension = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue