mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08: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
@ -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…
x
Reference in New Issue
Block a user