mirror of
https://github.com/samsonjs/media.git
synced 2026-04-07 11:35:46 +00: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue