From 6021701929143b768944e528d75b6627812e6a42 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 26 Mar 2008 12:08:50 +0100 Subject: [PATCH] src/gstaubiotempo.c: add gst_aubiotempo_finalize --- src/gstaubiotempo.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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; } - -- 2.11.0