summaryrefslogtreecommitdiff
path: root/libavformat/movenc.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2017-09-26 02:55:30 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-28 18:15:45 +0200
commit07e4be7ec94cbd8e674a260c939054f018d337eb (patch)
tree738af38f94f5311878c626dfeec1d10ac7589ef2 /libavformat/movenc.h
parentbf209013bff8f70facd9eada39009eff05f8e202 (diff)
movenc: Add an option for enabling negative CTS offsets
This reduces the need for an edit list; streams that start with e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid in mov/mp4) by shifting the dts values of all packets forward. This avoids the need for edit lists for such streams (while they still are needed for audio streams with encoder delay). This eases conformance with the DASH-IF interoperability guidelines. Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r--libavformat/movenc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index 4c4f3cdfc3..cc2a155d79 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -116,6 +116,7 @@ typedef struct MOVTrack {
int64_t start_cts;
int64_t end_pts;
int end_reliable;
+ int64_t dts_shift;
int hint_track; ///< the track that hints this track, -1 if no hint track is set
int src_track; ///< the track that this hint (or tmcd) track describes
@@ -241,6 +242,7 @@ typedef struct MOVMuxContext {
#define FF_MOV_FLAG_WRITE_GAMA (1 << 16)
#define FF_MOV_FLAG_USE_MDTA (1 << 17)
#define FF_MOV_FLAG_SKIP_TRAILER (1 << 18)
+#define FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS (1 << 19)
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt);