Skip to content

qtmux: Make sure to write 64-bit STCO table when needed.

qtmux attempts to choose between writing a 32-bit stco chunk offset table when it can, but switch to a 64-bit co64 table when file offsets go over 4GB.

This patch fixes a problem where the atom handling code was checking mdat-relative offsets instead of the final file offset (computed by adding the mdat position plus the mdat-relative offset) - leading to problems where files with a size between 4GB and 4GB+offset-of-the-mdat would write incorrect STCO tables with some samples having truncated 32-bit offsets.

Smaller files write STCO correctly, larger files would switch to co64 and also output correctly.

Merge request reports

Loading