avformat/mov: make STTS duration unsigned int

As per 8.6.1.2.2 of ISO/IEC 14496-12:2015(E), STTS sample offsets
are to be always stored as uint32_t. So far, they have been signed ints
which led to desync in files with very large offsets.

The MOVStts struct was used to store CTTS offsets as well. These can be
negative in version 1. So a new struct MOVCtts was created and all
declarations for CTTS usage changed to MOVCtts.
This commit is contained in:
Gyan Doshi
2021-11-16 18:44:32 +05:30
parent 18f22bfb27
commit 203b0e3561
3 changed files with 18 additions and 13 deletions

View File

@@ -2434,7 +2434,7 @@ static int mov_write_stsd_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
static int mov_write_ctts_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
{
MOVMuxContext *mov = s->priv_data;
MOVStts *ctts_entries;
MOVCtts *ctts_entries;
uint32_t entries = 0;
uint32_t atom_size;
int i;