summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-03-13 15:49:08 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-03-13 15:49:08 +0000
commit8a51401ef61672335deec8d55dfd421c06887783 (patch)
tree37e2f96f15d4238ff7126c968e91d20a2dd9b344 /gst
parentb6fc5016695a8234ff2deb78bfa8addd0e8631f4 (diff)
close #333784 unref the result of gst_pad_get_parent() by: Christophe Fergeau.
Original commit message from CVS: * ext/cairo/gsttextoverlay.c: (gst_text_overlay_setcaps): * ext/esd/esdmon.c: (gst_esdmon_get): * ext/flac/gstflactag.c: (gst_flac_tag_chain): * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_setcaps), (gst_gdk_pixbuf_sink_getcaps): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_getcaps), (gst_jpegenc_setcaps): * ext/jpeg/gstsmokedec.c: (gst_smokedec_chain): * ext/jpeg/gstsmokeenc.c: (gst_smokeenc_getcaps), (gst_smokeenc_setcaps): * ext/libmng/gstmngdec.c: (gst_mngdec_sinklink), (gst_mngdec_src_getcaps): * ext/libmng/gstmngenc.c: (gst_mngenc_sinklink), (gst_mngenc_chain): * ext/libpng/gstpngenc.c: (gst_pngenc_setcaps): * ext/mikmod/gstmikmod.c: (gst_mikmod_srclink): * ext/speex/gstspeexdec.c: (speex_dec_convert), (speex_dec_src_event), (speex_dec_chain): * gst/avi/gstavimux.c: (gst_avimux_vidsinkconnect), (gst_avimux_audsinkconnect), (gst_avimux_handle_event): * gst/debug/negotiation.c: (gst_negotiation_getcaps), (gst_negotiation_pad_link), (gst_negotiation_chain): * gst/flx/gstflxdec.c: (gst_flxdec_src_query_handler), (gst_flxdec_chain): * gst/interleave/deinterleave.c: (deinterleave_sink_link), (deinterleave_chain): * gst/law/mulaw-encode.c: (mulawenc_setcaps): * gst/median/gstmedian.c: (gst_median_link): * gst/monoscope/gstmonoscope.c: (gst_monoscope_srcconnect), (gst_monoscope_chain): * gst/rtp/gstrtpL16pay.c: (gst_rtpL16pay_sinkconnect): * gst/wavenc/gstwavenc.c: (gst_wavenc_sink_setcaps): * sys/osxaudio/gstosxaudiosink.c: (gst_osxaudiosink_chain): * sys/osxaudio/gstosxaudiosrc.c: (gst_osxaudiosrc_get): close #333784 unref the result of gst_pad_get_parent() by: Christophe Fergeau.
Diffstat (limited to 'gst')
-rw-r--r--gst/avi/gstavimux.c13
-rw-r--r--gst/debug/negotiation.c3
-rw-r--r--gst/flx/gstflxdec.c3
-rw-r--r--gst/law/mulaw-encode.c1
-rw-r--r--gst/median/gstmedian.c2
-rw-r--r--gst/monoscope/gstmonoscope.c5
-rw-r--r--gst/rtp/gstrtpL16pay.c6
-rw-r--r--gst/wavenc/gstwavenc.c3
8 files changed, 33 insertions, 3 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index a17f1066..253b7da7 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -317,8 +317,10 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
ret &= gst_structure_get_int (structure, "height", &avimux->vids.height);
fps = gst_structure_get_value (structure, "framerate");
ret &= (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
- if (!ret)
+ if (!ret) {
+ gst_object_unref (avimux);
return GST_PAD_LINK_REFUSED;
+ }
avimux->vids_hdr.rate = gst_value_get_fraction_numerator (fps);
avimux->vids_hdr.scale = gst_value_get_fraction_denominator (fps);
@@ -388,6 +390,7 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
}
if (!avimux->vids.compression) {
+ gst_object_unref (avimux);
return GST_PAD_LINK_DELAYED;
}
}
@@ -397,6 +400,9 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
avimux->avi_hdr.width = avimux->vids.width;
avimux->avi_hdr.height = avimux->vids.height;
avimux->avi_hdr.us_frame = avimux->vids_hdr.scale;
+
+ gst_object_unref (avimux);
+
return GST_PAD_LINK_OK;
}
@@ -463,6 +469,7 @@ gst_avimux_audsinkconnect (GstPad * pad, const GstCaps * vscaps)
avimux->auds.size = 16;
if (!avimux->auds.format) {
+ gst_object_unref (avimux);
return GST_PAD_LINK_REFUSED;
}
}
@@ -470,6 +477,9 @@ gst_avimux_audsinkconnect (GstPad * pad, const GstCaps * vscaps)
avimux->auds_hdr.rate = avimux->auds.blockalign * avimux->auds.rate;
avimux->auds_hdr.samplesize = avimux->auds.blockalign;
avimux->auds_hdr.scale = 1;
+
+ gst_object_unref (avimux);
+
return GST_PAD_LINK_OK;
}
@@ -1089,6 +1099,7 @@ gst_avimux_handle_event (GstPad * pad, GstEvent * event)
}
gst_event_unref (event);
+ gst_object_unref (avimux);
return TRUE;
}
diff --git a/gst/debug/negotiation.c b/gst/debug/negotiation.c
index 25f30024..da8a3033 100644
--- a/gst/debug/negotiation.c
+++ b/gst/debug/negotiation.c
@@ -210,6 +210,7 @@ gst_negotiation_getcaps (GstPad * pad)
GST_PTR_FORMAT, pad, caps);
gst_negotiation_update_caps (negotiation);
+ gst_object_unref (negotiation);
return caps;
}
@@ -228,6 +229,7 @@ gst_negotiation_pad_link (GstPad * pad, const GstCaps * caps)
GST_ERROR ("pad_link called on %" GST_PTR_FORMAT " with caps %"
GST_PTR_FORMAT ", returning %d", pad, caps, ret);
+ gst_object_unref (negotiation);
return ret;
}
@@ -257,6 +259,7 @@ gst_negotiation_chain (GstPad * pad, GstData * _data)
GstNegotiation *negotiation = GST_NEGOTIATION (gst_pad_get_parent (pad));
gst_pad_push (negotiation->srcpad, _data);
+ gst_object_unref (negotiation);
}
static void
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index 9401249f..1b8d4482 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -627,7 +627,7 @@ gst_flxdec_chain (GstPad * pad, GstBuffer * buf)
}
}
need_more_data:
-
+ gst_object_unref (flxdec);
return res;
/* ERRORS */
@@ -635,6 +635,7 @@ wrong_type:
{
GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL),
("not a flx file (type %x)", flxh->type));
+ gst_object_unref (flxdec);
return GST_FLOW_ERROR;
}
}
diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c
index defb7dde..f9e1eccd 100644
--- a/gst/law/mulaw-encode.c
+++ b/gst/law/mulaw-encode.c
@@ -126,6 +126,7 @@ mulawenc_setcaps (GstPad * pad, GstCaps * caps)
gst_pad_set_caps (otherpad, base_caps);
+ gst_object_unref (mulawenc);
gst_caps_unref (base_caps);
return TRUE;
diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c
index 4327c009..3f09f086 100644
--- a/gst/median/gstmedian.c
+++ b/gst/median/gstmedian.c
@@ -154,6 +154,8 @@ gst_median_link (GstPad * pad, const GstCaps * caps)
filter->height = h;
}
+ gst_object_unref (filter);
+
return ret;
}
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c
index 4497d9ce..82d3cb7a 100644
--- a/gst/monoscope/gstmonoscope.c
+++ b/gst/monoscope/gstmonoscope.c
@@ -224,6 +224,8 @@ gst_monoscope_srcconnect (GstPad * pad, const GstCaps * caps)
gst_structure_get_int (structure, "height", &monoscope->height);
gst_structure_get_double (structure, "framerate", &monoscope->fps);
+ gst_object_unref (monoscope);
+
return GST_PAD_LINK_OK;
}
@@ -250,6 +252,7 @@ gst_monoscope_chain (GstPad * pad, GstData * _data)
GST_DEBUG ("timestamp is %" G_GUINT64_FORMAT ": want >= %" G_GUINT64_FORMAT,
GST_BUFFER_TIMESTAMP (bufin), monoscope->next_time);
gst_buffer_unref (bufin);
+ gst_object_unref (monoscope);
return;
}
@@ -266,6 +269,7 @@ gst_monoscope_chain (GstPad * pad, GstData * _data)
if (!gst_pad_is_negotiated (monoscope->srcpad)) {
if (gst_pad_renegotiate (monoscope->srcpad) <= 0) {
GST_ELEMENT_ERROR (monoscope, CORE, NEGOTIATION, (NULL), (NULL));
+ gst_object_unref (monoscope);
return;
}
}
@@ -284,6 +288,7 @@ gst_monoscope_chain (GstPad * pad, GstData * _data)
gst_pad_push (monoscope->srcpad, GST_DATA (bufout));
gst_buffer_unref (bufin);
+ gst_object_unref (monoscope);
GST_DEBUG ("Monoscope: exiting chainfunc");
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c
index 466e4b0a..f68425c0 100644
--- a/gst/rtp/gstrtpL16pay.c
+++ b/gst/rtp/gstrtpL16pay.c
@@ -171,13 +171,17 @@ gst_rtpL16pay_sinkconnect (GstPad * pad, const GstCaps * caps)
ret = gst_structure_get_int (structure, "rate", &rtpL16enc->frequency);
ret &= gst_structure_get_int (structure, "channels", &rtpL16enc->channels);
- if (!ret)
+ if (!ret) {
+ gst_object_unref (rtpL16enc);
return GST_PAD_LINK_REFUSED;
+ }
/* Pre-calculate what we can */
rtpL16enc->time_interval =
GST_SECOND / (2 * rtpL16enc->channels * rtpL16enc->frequency);
+ gst_object_unref (rtpL16enc);
+
return GST_PAD_LINK_OK;
}
diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c
index da6b8b7d..f392b6ee 100644
--- a/gst/wavenc/gstwavenc.c
+++ b/gst/wavenc/gstwavenc.c
@@ -253,9 +253,12 @@ gst_wavenc_sink_setcaps (GstPad * pad, GstCaps * caps)
gst_wavenc_setup (wavenc);
if (wavenc->setup) {
+ gst_object_unref (wavenc);
return TRUE;
}
+ gst_object_unref (wavenc);
+
return FALSE;
}