mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
gst/: Return the result in _activate_pull(). Don't ref element there.
Original commit message from CVS: * gst/avi/gstavidemux.c: * gst/wavparse/gstwavparse.c: Return the result in _activate_pull(). Don't ref element there.
This commit is contained in:
parent
34c221a52f
commit
561bfe0457
3 changed files with 19 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-11-13 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* gst/avi/gstavidemux.c:
|
||||||
|
* gst/wavparse/gstwavparse.c:
|
||||||
|
Return the result in _activate_pull(). Don't ref element there.
|
||||||
|
|
||||||
2007-11-13 Stefan Kost <ensonic@users.sf.net>
|
2007-11-13 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers),
|
* gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers),
|
||||||
|
|
|
@ -3834,6 +3834,7 @@ static gboolean
|
||||||
gst_avi_demux_sink_activate (GstPad * sinkpad)
|
gst_avi_demux_sink_activate (GstPad * sinkpad)
|
||||||
{
|
{
|
||||||
if (gst_pad_check_pull_range (sinkpad)) {
|
if (gst_pad_check_pull_range (sinkpad)) {
|
||||||
|
GST_DEBUG ("going to pull mode");
|
||||||
return gst_pad_activate_pull (sinkpad, TRUE);
|
return gst_pad_activate_pull (sinkpad, TRUE);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG ("going to push (streaming) mode");
|
GST_DEBUG ("going to push (streaming) mode");
|
||||||
|
@ -3844,18 +3845,16 @@ gst_avi_demux_sink_activate (GstPad * sinkpad)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
||||||
{
|
{
|
||||||
GstAviDemux *avi = GST_AVI_DEMUX (gst_pad_get_parent (sinkpad));
|
GstAviDemux *avi = GST_AVI_DEMUX (GST_OBJECT_PARENT (sinkpad));
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
avi->segment_running = TRUE;
|
avi->segment_running = TRUE;
|
||||||
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop, sinkpad);
|
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
||||||
|
sinkpad);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_stop_task (sinkpad);
|
|
||||||
avi->segment_running = FALSE;
|
avi->segment_running = FALSE;
|
||||||
|
return gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
gst_object_unref (avi);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -1974,8 +1974,10 @@ gst_wavparse_pad_query (GstPad * pad, GstQuery * query)
|
||||||
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (pad));
|
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
/* only if we know */
|
/* only if we know */
|
||||||
if (wav->state != GST_WAVPARSE_DATA)
|
if (wav->state != GST_WAVPARSE_DATA) {
|
||||||
|
gst_object_unref (wav);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (GST_QUERY_TYPE (query)) {
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
case GST_QUERY_POSITION:
|
case GST_QUERY_POSITION:
|
||||||
|
@ -2117,20 +2119,17 @@ gst_wavparse_sink_activate (GstPad * sinkpad)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
||||||
{
|
{
|
||||||
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (sinkpad));
|
GstWavParse *wav = GST_WAVPARSE (GST_OBJECT_PARENT (sinkpad));
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (wav, "activating pull");
|
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
/* if we have a scheduler we can start the task */
|
/* if we have a scheduler we can start the task */
|
||||||
wav->segment_running = TRUE;
|
wav->segment_running = TRUE;
|
||||||
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_wavparse_loop, sinkpad);
|
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_wavparse_loop,
|
||||||
|
sinkpad);
|
||||||
} else {
|
} else {
|
||||||
gst_pad_stop_task (sinkpad);
|
wav->segment_running = FALSE;
|
||||||
|
return gst_pad_stop_task (sinkpad);
|
||||||
}
|
}
|
||||||
gst_object_unref (wav);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
|
|
Loading…
Reference in a new issue