mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Handle empty PRIV frames
Issue: #2486 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=148217936
This commit is contained in:
parent
ddbced7317
commit
698e081eda
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue