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
This commit is contained in:
ibaker 2020-07-21 13:44:48 +01:00 committed by Oliver Woodman
parent e0b7263ce4
commit 4fbd09693a

View file

@ -328,8 +328,9 @@ public final class Mp4Extractor implements Extractor, SeekMap {
// lengths greater than Integer.MAX_VALUE.
Assertions.checkState(atomHeaderBytesRead == Atom.HEADER_SIZE);
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);
this.atomData = atomData;
parserState = STATE_READING_ATOM_PAYLOAD;
} else {
atomData = null;