diff options
author | Edward Hervey <bilboed@bilboed.com> | 2008-10-16 09:18:31 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2008-10-16 09:18:31 +0000 |
commit | 37167605cdeaf7c9dcb39c80c0c0efb7f589b11f (patch) | |
tree | 6601f0e3ebb47d54beb2badd9daf1a226785d0be /gst/mpegdemux | |
parent | d8ed703cdb8b97c89aaa6a5f6eab0c9998d8f1a2 (diff) | |
download | gst-plugins-bad-37167605cdeaf7c9dcb39c80c0c0efb7f589b11f.tar.gz gst-plugins-bad-37167605cdeaf7c9dcb39c80c0c0efb7f589b11f.tar.bz2 gst-plugins-bad-37167605cdeaf7c9dcb39c80c0c0efb7f589b11f.zip |
gst/mpegdemux/gstmpegdemux.c: Make sure the mpegpsdemux element creates valid newsegment events.
Original commit message from CVS:
* gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data):
Make sure the mpegpsdemux element creates valid newsegment events.
Fixes #556428
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r-- | gst/mpegdemux/gstmpegdemux.c | 10 |
1 files changed, 8 insertions, 2 deletions
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; |