mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
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:
parent
cf4a1965da
commit
462f32dd4a
2 changed files with 17 additions and 10 deletions
|
@ -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):
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue