Commit 88475e4f by J. Oliva

Fixed issue in the calculation of size of objectData

- Fixed issue in the calculation of size of objectData
- Indentation fixes
parent 1739af68
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment