summaryrefslogtreecommitdiffstats
path: root/gst/wavparse
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-11-13 06:55:28 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-11-13 06:55:28 +0000
commit561bfe045733931b0a75e936108dd1a312387a08 (patch)
tree8c38b39f0c19c8595bba916ce7e0990c6c595498 /gst/wavparse
parent34c221a52f3aec1726c8d390bee259c1381fa8a9 (diff)
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.
Diffstat (limited to 'gst/wavparse')
-rw-r--r--gst/wavparse/gstwavparse.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 8512ed52..78394426 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -1974,8 +1974,10 @@ gst_wavparse_pad_query (GstPad * pad, GstQuery * query)
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (pad));
/* only if we know */
- if (wav->state != GST_WAVPARSE_DATA)
+ if (wav->state != GST_WAVPARSE_DATA) {
+ gst_object_unref (wav);
return FALSE;
+ }
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
@@ -2117,20 +2119,17 @@ gst_wavparse_sink_activate (GstPad * sinkpad)
static gboolean
gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active)
{
- GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (sinkpad));
-
- GST_DEBUG_OBJECT (wav, "activating pull");
+ GstWavParse *wav = GST_WAVPARSE (GST_OBJECT_PARENT (sinkpad));
if (active) {
/* if we have a scheduler we can start the task */
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 {
- gst_pad_stop_task (sinkpad);
+ wav->segment_running = FALSE;
+ return gst_pad_stop_task (sinkpad);
}
- gst_object_unref (wav);
-
- return TRUE;
};
static GstStateChangeReturn