mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
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>
This commit is contained in:
committed by
Martin Storsjö
parent
4981baf9b8
commit
1384df6419
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user