diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2015-03-24 12:56:53 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2015-04-09 15:44:20 +0100 |
commit | ade79a9ad24a72d1b02f2e35e7dbeaf3bd59bb6c (patch) | |
tree | ca8a7cbdb3a2059dc08a84006e00a3fb858b89c2 /gst/mpegtsdemux | |
parent | fc2460b33196020d034b72741ce04cddf6e3f1b9 (diff) | |
download | gstreamer-plugins-bad-ade79a9ad24a72d1b02f2e35e7dbeaf3bd59bb6c.tar.gz |
tsdemux: send new segment when a stream is added
This will happen when the PMT changes, replacing streams with
new ones. In that case, we need to accumulate the running time
from the previous chain in the segment base.
https://bugzilla.gnome.org/show_bug.cgi?id=745102
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index b7bae7d02..a9cf88b54 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -1399,6 +1399,7 @@ gst_ts_demux_stream_added (MpegTSBase * base, MpegTSBaseStream * bstream, stream->active = FALSE; stream->need_newsegment = TRUE; + demux->reset_segment = TRUE; stream->needs_keyframe = FALSE; stream->discont = TRUE; stream->pts = GST_CLOCK_TIME_NONE; @@ -1957,7 +1958,7 @@ calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream) demux->segment = base->segment; } else { /* Start from the first ts/pts */ - GstClockTime base = demux->segment.base; + GstClockTime base = 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; |