tsdemux: accumulate previous segment base time

This commit is contained in:
Vincent Penquerc'h 2015-05-06 15:16:37 +01:00
parent 29fd6332a4
commit 4a219df304

View file

@ -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;