summaryrefslogtreecommitdiff
path: root/libavformat/isom.h
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2021-11-27 15:21:12 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2021-12-31 14:44:20 +0530
commit9cfc7a244052dced520776ff0ecc6f0a9390f62b (patch)
treee09cc9d3167105be99a9515efa2f64857cd2b02d /libavformat/isom.h
parent6b7e4de0dbc78a630bfea27e917798b4d5b61abf (diff)
avformat/mov: add option max_stts_delta
Very high stts sample deltas may occasionally be intended but usually they are written in error or used to store a negative value for dts correction when treated as signed 32-bit integers. This option lets the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when cast to int32 are used to adjust onward dts. Unit is the track time scale. Default is UINT_MAX - 48000*10 which allows upto a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of uint32 range. Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r--libavformat/isom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h
index ef8f19b18c..625dea8421 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -305,6 +305,7 @@ typedef struct MOVContext {
int32_t movie_display_matrix[3][3]; ///< display matrix from mvhd
int have_read_mfra_size;
uint32_t mfra_size;
+ uint32_t max_stts_delta;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);