diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-21 02:43:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-22 22:39:49 +0100 |
commit | a89c01253190b9eb9de8e28a3252423bf7732511 (patch) | |
tree | b090bc0538590bcca733998f4b994c34c12767f7 /libavformat/mux.c | |
parent | f284e2a58a133e96d74d4da7ae91e459d4bfa81b (diff) | |
download | ffmpeg-a89c01253190b9eb9de8e28a3252423bf7732511.tar.gz |
avformat/mux: support shifting timestamps so they start at 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 2241dbe0e6..1c15a91cd0 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -538,7 +538,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) AVStream *st = s->streams[pkt->stream_index]; int64_t offset = st->mux_ts_offset; - if (pkt->dts < 0 && pkt->dts != AV_NOPTS_VALUE && !s->offset) { + if ((pkt->dts < 0 || s->avoid_negative_ts == 2) && pkt->dts != AV_NOPTS_VALUE && !s->offset) { s->offset = -pkt->dts; s->offset_timebase = st->time_base; } |