summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward.hervey@collabora.co.uk>2011-08-01 18:49:55 +0200
committerEdward Hervey <edward.hervey@collabora.co.uk>2011-08-01 18:49:55 +0200
commit5c77682dabf2a289d7e8cdced379f85aeb0f3192 (patch)
tree96e9ee8a3409e68dbba162a5ecfd2ce11e52373a /gst/mpegtsdemux
parent5572e638589a10fd91bc6beff96585c2bb65d379 (diff)
tsdemux: Take into account upstream newsegment events
If the incoming newsegment event was in time, use that position value for the downstream newsegments.
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/tsdemux.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index fc0df389f..e859ea9c6 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -2066,6 +2066,19 @@ calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream)
/* FIXME : We're just ignore the upstream format for the time being */
/* FIXME : We should use base->segment.format and a upstream latency query
* to decide if we need to use live values or not */
+ GST_DEBUG ("push-based. base Segment start:%" GST_TIME_FORMAT " duration:%"
+ GST_TIME_FORMAT ", time:%" GST_TIME_FORMAT,
+ GST_TIME_ARGS (base->segment.start),
+ GST_TIME_ARGS (base->segment.duration),
+ GST_TIME_ARGS (base->segment.time));
+ GST_DEBUG ("push-based. demux Segment start:%" GST_TIME_FORMAT " duration:%"
+ GST_TIME_FORMAT ", time:%" GST_TIME_FORMAT,
+ GST_TIME_ARGS (demux->segment.start),
+ GST_TIME_ARGS (demux->segment.duration),
+ GST_TIME_ARGS (demux->segment.time));
+
+ if (demux->segment.time == 0 && base->segment.format == GST_FORMAT_TIME)
+ demux->segment.time = base->segment.time;
start = firstpts;
stop = GST_CLOCK_TIME_NONE;