diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gst/mpegdemux/gstmpegdemux.c | 10 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,9 @@ +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 diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index d0926f70..2b8168ae 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -453,12 +453,18 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, 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; |