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:
J. Oliva 2015-02-27 22:09:05 +01:00
parent 1739af685a
commit 88475e4fee

View file

@ -100,9 +100,11 @@ public class Id3Parser implements MetadataParser<Map<String, Object>> {
String description = new String(frame, descriptionStartIndex,
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,
frameSize - descriptionEndIndex - 2);
objectDataSize);
metadata.put(GeobMetadata.TYPE, new GeobMetadata(mimeType, filename,
description, objectData));
} else {