diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2021-11-16 18:44:32 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2021-11-22 15:18:42 +0530 |
commit | 203b0e3561dea1ec459be226d805abe73e7535e5 (patch) | |
tree | 614069a11b1607478a96adbbe4b778f518c844c3 /libavformat/isom.h | |
parent | 18f22bfb27e4919572b1b0a7f365a494364704f9 (diff) |
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.
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index f3c18c95be..ef8f19b18c 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -55,9 +55,14 @@ struct AVAESCTR; typedef struct MOVStts { unsigned int count; - int duration; + unsigned int duration; } MOVStts; +typedef struct MOVCtts { + unsigned int count; + int duration; +} MOVCtts; + typedef struct MOVStsc { int first; int count; @@ -168,7 +173,7 @@ typedef struct MOVStreamContext { uint8_t *sdtp_data; unsigned int ctts_count; unsigned int ctts_allocated_size; - MOVStts *ctts_data; + MOVCtts *ctts_data; unsigned int stsc_count; MOVStsc *stsc_data; unsigned int stsc_index; |