From 66ae994c544a46e4f6915222d8608b3d87b39b07 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Jul 2014 23:22:33 +0200 Subject: [PATCH] avformat/segment: re-interleave packets if needed Fixes part of Ticket 3797 Signed-off-by: Michael Niedermayer --- libavformat/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index cae0f114a5..ce784da225 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -766,7 +766,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base), av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base)); - ret = ff_write_chained(seg->avf, pkt->stream_index, pkt, s, 0); + ret = ff_write_chained(seg->avf, pkt->stream_index, pkt, s, seg->initial_offset || seg->reset_timestamps); fail: if (pkt->stream_index == seg->reference_stream_index) {