diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-20 22:08:52 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-07-22 15:58:02 -0400 |
commit | 22b95ab4cdbbac7cde1487abde5d57ea2c311e15 (patch) | |
tree | a68b7c6ab68b2a8af6dfc0a546ed88be8f4c0f3e /ext/mimic | |
parent | 8f1301390de7662292dd18cc6dd863062953a777 (diff) | |
download | gstreamer-plugins-bad-22b95ab4cdbbac7cde1487abde5d57ea2c311e15.tar.gz |
mimdec: Fix leaks
Use gst_pad_new_from_static_template() to not leak the pad template
Also properly chain up the finalize to the parent
Diffstat (limited to 'ext/mimic')
-rw-r--r-- | ext/mimic/gstmimdec.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index 5b28f4570..9cd2c36ce 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -113,16 +113,12 @@ gst_mimdec_class_init (GstMimDecClass * klass) static void gst_mimdec_init (GstMimDec * mimdec, GstMimDecClass * klass) { - mimdec->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get (&sink_factory), - "sink"); + mimdec->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); gst_element_add_pad (GST_ELEMENT (mimdec), mimdec->sinkpad); gst_pad_set_chain_function (mimdec->sinkpad, gst_mimdec_chain); gst_pad_set_event_function (mimdec->sinkpad, gst_mimdec_sink_event); - mimdec->srcpad = - gst_pad_new_from_template (gst_static_pad_template_get (&src_factory), - "src"); + mimdec->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_element_add_pad (GST_ELEMENT (mimdec), mimdec->srcpad); mimdec->adapter = gst_adapter_new (); @@ -141,6 +137,8 @@ gst_mimdec_finalize (GObject * object) gst_adapter_clear (mimdec->adapter); g_object_unref (mimdec->adapter); + + GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); } static GstFlowReturn |