Commit 4847889a by aquilescanta Committed by Oliver Woodman

Prevent IllegalStateException in Mp4 sniffing

If a negative value is read, sniffing should just fail.

PiperOrigin-RevId: 227689568
parent 61a7750f
......@@ -109,7 +109,7 @@ import java.io.IOException;
headerSize = Atom.LONG_HEADER_SIZE;
input.peekFully(buffer.data, Atom.HEADER_SIZE, Atom.LONG_HEADER_SIZE - Atom.HEADER_SIZE);
buffer.setLimit(Atom.LONG_HEADER_SIZE);
atomSize = buffer.readUnsignedLongToLong();
atomSize = buffer.readLong();
} else if (atomSize == Atom.EXTENDS_TO_END_SIZE) {
// The atom extends to the end of the file.
long endPosition = input.getLength();
......
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