Commit 4fbd0969 by ibaker Committed by Oliver Woodman

Fix nullness error in Mp4Extractor

This only manifests when turning ParsableByteArray#data into a getData()
method but I'm fixing it beforehand to avoid introducing changes into a
big refactoring change.

#exofixit

PiperOrigin-RevId: 322342497
parent e0b7263c
...@@ -328,8 +328,9 @@ public final class Mp4Extractor implements Extractor, SeekMap { ...@@ -328,8 +328,9 @@ public final class Mp4Extractor implements Extractor, SeekMap {
// lengths greater than Integer.MAX_VALUE. // lengths greater than Integer.MAX_VALUE.
Assertions.checkState(atomHeaderBytesRead == Atom.HEADER_SIZE); Assertions.checkState(atomHeaderBytesRead == Atom.HEADER_SIZE);
Assertions.checkState(atomSize <= Integer.MAX_VALUE); Assertions.checkState(atomSize <= Integer.MAX_VALUE);
atomData = new ParsableByteArray((int) atomSize); ParsableByteArray atomData = new ParsableByteArray((int) atomSize);
System.arraycopy(atomHeader.data, 0, atomData.data, 0, Atom.HEADER_SIZE); System.arraycopy(atomHeader.data, 0, atomData.data, 0, Atom.HEADER_SIZE);
this.atomData = atomData;
parserState = STATE_READING_ATOM_PAYLOAD; parserState = STATE_READING_ATOM_PAYLOAD;
} else { } else {
atomData = null; atomData = null;
......
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