+2008-10-16 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data):
+ Make sure the mpegpsdemux element creates valid newsegment events.
+ Fixes #556428
+
2008-10-16 Zaheer Abbas Merali <zaheerabbas at merali dot org>
patch by: Sebastian Pölsterl
gint64 time, start, stop;
GstEvent *newsegment;
- start = demux->base_time + demux->src_segment.start;
+ if (GST_CLOCK_TIME_IS_VALID (demux->base_time) &&
+ GST_CLOCK_TIME_IS_VALID (demux->src_segment.start))
+ start = demux->base_time + demux->src_segment.start;
+ else
+ start = 0;
+
if (timestamp != GST_CLOCK_TIME_NONE &&
GST_CLOCK_DIFF (start, timestamp) > GST_SECOND)
start = timestamp;
- if (demux->src_segment.stop != -1)
+ if (GST_CLOCK_TIME_IS_VALID (demux->src_segment.stop) &&
+ GST_CLOCK_TIME_IS_VALID (demux->base_time))
stop = demux->base_time + demux->src_segment.stop;
else
stop = -1;