libs/gst/base/gstbasesrc.c: Only push the segment events in the PLAYING state for live sources.

Original commit message from CVS:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_range),
(gst_base_src_loop):
Only push the segment events in the PLAYING state for live sources.
This commit is contained in:
Wim Taymans 2007-03-25 15:33:35 +00:00
parent cf4a1965da
commit 462f32dd4a
2 changed files with 17 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2007-03-25 Wim Taymans <wim@fluendo.com>
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_range),
(gst_base_src_loop):
Only push the segment events in the PLAYING state for live sources.
2007-03-23 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gstpipeline.c: (gst_pipeline_change_state):

View file

@ -1550,16 +1550,6 @@ gst_base_src_loop (GstPad * pad)
src->priv->last_sent_eos = FALSE;
/* push events to close/start our segment before we do the real work. */
if (src->priv->close_segment) {
gst_pad_push_event (pad, src->priv->close_segment);
src->priv->close_segment = NULL;
}
if (src->priv->start_segment) {
gst_pad_push_event (pad, src->priv->start_segment);
src->priv->start_segment = NULL;
}
/* if we operate in bytes, we can calculate an offset */
if (src->segment.format == GST_FORMAT_BYTES)
position = src->segment.last_stop;
@ -1572,9 +1562,20 @@ gst_base_src_loop (GstPad * pad)
gst_flow_get_name (ret));
goto pause;
}
/* this should not happen */
if (G_UNLIKELY (buf == NULL))
goto null_buffer;
/* push events to close/start our segment before we push the buffer. */
if (src->priv->close_segment) {
gst_pad_push_event (pad, src->priv->close_segment);
src->priv->close_segment = NULL;
}
if (src->priv->start_segment) {
gst_pad_push_event (pad, src->priv->start_segment);
src->priv->start_segment = NULL;
}
/* figure out the new position */
switch (src->segment.format) {
case GST_FORMAT_BYTES: