Commit 698e081e by olly Committed by Oliver Woodman

Handle empty PRIV frames

Issue: #2486

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148217936
parent ddbced73
......@@ -404,6 +404,11 @@ public final class Id3Decoder implements MetadataDecoder {
private static PrivFrame decodePrivFrame(ParsableByteArray id3Data, int frameSize)
throws UnsupportedEncodingException {
if (frameSize == 0) {
// Frame is empty.
return new PrivFrame("", new byte[0]);
}
byte[] data = new byte[frameSize];
id3Data.readBytes(data, 0, frameSize);
......
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