mirror of
https://github.com/androidx/media.git
synced 2025-05-14 02:59:52 +08:00
Prevent IllegalStateException in Mp4 sniffing
If a negative value is read, sniffing should just fail. PiperOrigin-RevId: 227689568
This commit is contained in:
parent
781ba39097
commit
d30375c9a1
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user