From 4a219df3040a99dd935ef23c15afb132266ec1cb Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 6 May 2015 15:16:37 +0100 Subject: [PATCH] tsdemux: accumulate previous segment base time --- gst/mpegtsdemux/tsdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index e8c13f6c8e..4f05672488 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -1998,7 +1998,8 @@ calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream) demux->segment = base->segment; } else { /* Start from the first ts/pts */ - GstClockTime base = demux->segment.position - demux->segment.start; + GstClockTime base = + demux->segment.base + demux->segment.position - demux->segment.start; gst_segment_init (&demux->segment, GST_FORMAT_TIME); demux->segment.start = firstts; demux->segment.stop = GST_CLOCK_TIME_NONE;