mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
Fix version and flags in the ctts box
The version and flags are stored in a single integer, with the version in the higher 8 bits and the flags in the lower 24 bits. The version should be 1 and the flags should be 0. Surprisingly the incorrect value was ignored by many players and hence the bug was never caught. With the bug, the video does not play on `Samsung Galaxy S22 Ultra` and works well after fixing the bug. PiperOrigin-RevId: 684433371
This commit is contained in:
parent
3818e103e6
commit
1729e11159
@ -898,7 +898,8 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
|
||||
ByteBuffer.allocate(
|
||||
2 * BYTES_PER_INTEGER + 2 * compositionOffsets.size() * BYTES_PER_INTEGER);
|
||||
|
||||
contents.putInt(1); // version and flags.
|
||||
int versionAndFlags = 1 << 24; // version (value 1, 8 bits) + flag (value 0, 24 bits)
|
||||
contents.putInt(versionAndFlags);
|
||||
|
||||
// Total entry count is known only after processing all the composition offsets, so put in
|
||||
// a placeholder for total entry count and store its index.
|
||||
|
@ -1,2 +1,2 @@
|
||||
ctts (88 bytes):
|
||||
Data = length 80, hash FC850C18
|
||||
Data = length 80, hash D9A9F376
|
||||
|
Loading…
x
Reference in New Issue
Block a user