summaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-26 15:55:16 +0200
committerMartin Storsjö <martin@martin.st>2014-11-07 12:11:35 +0200
commit1384df641994bf3d6cb51084290aa94752737bae (patch)
tree2a6afda25be9445d37d7e5436efaa7e3e5479132 /libavformat/avformat.h
parent4981baf9b803f3c4866b2e97fdadb008c62dc7ad (diff)
downloadffmpeg-streaming-1384df641994bf3d6cb51084290aa94752737bae.zip
ffmpeg-streaming-1384df641994bf3d6cb51084290aa94752737bae.tar.gz
lavf: Add an option for avoiding negative timestamps
This is the same logic as is invoked on AVFMT_TS_NEGATIVE, but which can be enabled manually, or can be enabled in muxers which only need it in certain conditions. Also allow using the same mechanism to force streams to start at 0. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f28186f..ade5d2f 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1198,6 +1198,18 @@ typedef struct AVFormatContext {
*/
int max_ts_probe;
+ /**
+ * Avoid negative timestamps during muxing.
+ * Any value of the AVFMT_AVOID_NEG_TS_* constants.
+ * Note, this only works when using av_interleaved_write_frame.
+ * - muxing: Set by user
+ * - demuxing: unused
+ */
+ int avoid_negative_ts;
+#define AVFMT_AVOID_NEG_TS_AUTO -1 ///< Enabled when required by target format
+#define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1 ///< Shift timestamps so they are non negative
+#define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2 ///< Shift timestamps so that they start at 0
+
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavformat and can be changed and
OpenPOWER on IntegriCloud