summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-01 01:26:48 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-05 20:36:01 +0200
commit1a8309e954b894675aa450db5c117240195385a9 (patch)
treecb9e99d8fe5ca1b42514a17872b6e18b71394523 /libavformat/internal.h
parenteb325324aabe6ae479bbf15256321da8e39238d4 (diff)
avformat/mux: Allow muxers to set custom min timestamp
Matroska requires pts to be >= 0 with a slight exception: It has a mechanism to deal with codec delay, i.e. with the data added at the beginning that does not correspond to actual input data and should be discarded by the player. Only the audio actually intended to be output needs to have a timestamp >= 0. In order to avoid unnecessary timestamp shifting, this patch allows muxers to inform the shifting code about this so that it can take it into account. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 9b07cfb271..23757dc4fc 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -311,6 +311,13 @@ typedef struct FFStream {
int64_t mux_ts_offset;
/**
+ * This is the lowest ts allowed in this track; it may be set by the muxer
+ * during init or write_header and influences the automatic timestamp
+ * shifting code.
+ */
+ int64_t lowest_ts_allowed;
+
+ /**
* Internal data to check for wrapping of the time stamp
*/
int64_t pts_wrap_reference;