mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fixed issue in the calculation of size of objectData
- Fixed issue in the calculation of size of objectData - Indentation fixes
This commit is contained in:
parent
1739af685a
commit
88475e4fee
1 changed files with 8 additions and 6 deletions
|
|
@ -100,9 +100,11 @@ public class Id3Parser implements MetadataParser<Map<String, Object>> {
|
||||||
String description = new String(frame, descriptionStartIndex,
|
String description = new String(frame, descriptionStartIndex,
|
||||||
descriptionEndIndex - descriptionStartIndex, charset);
|
descriptionEndIndex - descriptionStartIndex, charset);
|
||||||
|
|
||||||
byte[] objectData = new byte[frameSize - descriptionEndIndex - 2];
|
int objectDataSize = frameSize - 1 /* encoding byte */ - descriptionEndIndex -
|
||||||
|
delimiterLength(encoding);
|
||||||
|
byte[] objectData = new byte[objectDataSize];
|
||||||
System.arraycopy(frame, descriptionEndIndex + delimiterLength(encoding), objectData, 0,
|
System.arraycopy(frame, descriptionEndIndex + delimiterLength(encoding), objectData, 0,
|
||||||
frameSize - descriptionEndIndex - 2);
|
objectDataSize);
|
||||||
metadata.put(GeobMetadata.TYPE, new GeobMetadata(mimeType, filename,
|
metadata.put(GeobMetadata.TYPE, new GeobMetadata(mimeType, filename,
|
||||||
description, objectData));
|
description, objectData));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue