From: Paul Brossier Date: Wed, 26 Mar 2008 11:08:50 +0000 (+0100) Subject: src/gstaubiotempo.c: add gst_aubiotempo_finalize X-Git-Tag: 0.10.0.1~15 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=6021701929143b768944e528d75b6627812e6a42;p=gst-aubio.git src/gstaubiotempo.c: add gst_aubiotempo_finalize --- diff --git a/src/gstaubiotempo.c b/src/gstaubiotempo.c index d2ca0d0..cb1c7f1 100644 --- a/src/gstaubiotempo.c +++ b/src/gstaubiotempo.c @@ -70,6 +70,7 @@ enum GST_BOILERPLATE (GstAubioTempo, gst_aubiotempo, GstAudioFilter, GST_TYPE_AUDIO_FILTER); +static void gst_aubiotempo_finalize (GObject * obj); static void gst_aubiotempo_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_aubiotempo_get_property (GObject * object, guint prop_id, @@ -109,6 +110,7 @@ gst_aubiotempo_class_init (GstAubioTempoClass * klass) trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_aubiotempo_transform_ip); trans_class->passthrough_on_same_caps = TRUE; + gobject_class->finalize = gst_aubiotempo_finalize; gobject_class->set_property = gst_aubiotempo_set_property; gobject_class->get_property = gst_aubiotempo_get_property; @@ -137,6 +139,24 @@ gst_aubiotempo_init (GstAubioTempo * filter, } static void +gst_aubiotempo_finalize (GObject * obj) +{ + GstAubioTempo * aubiotempo = GST_AUBIOTEMPO (obj); + + if (aubiotempo->t) { + del_aubio_tempo(aubiotempo->t); + } + if (aubiotempo->ibuf) { + del_fvec(aubiotempo->ibuf); + } + if (aubiotempo->out) { + del_fvec(aubiotempo->out); + } + + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static void gst_aubiotempo_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { @@ -201,4 +221,3 @@ gst_aubiotempo_transform_ip (GstBaseTransform * trans, GstBuffer * buf) return GST_FLOW_OK; } -