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>
This commit is contained in:
@@ -310,6 +310,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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user