summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2007-11-26 10:08:20 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2007-11-26 10:08:20 +0000
commit5153aa15d468c838622f07426c0d4b86442872ae (patch)
treea4e2b16bcc83c6a26fd8731db4c9902313abba07
parentfcebc2b4f548bcb9d6b8f0b4aaa7c1272205bf2d (diff)
downloadgst-plugins-bad-5153aa15d468c838622f07426c0d4b86442872ae.tar.gz
gst-plugins-bad-5153aa15d468c838622f07426c0d4b86442872ae.tar.bz2
gst-plugins-bad-5153aa15d468c838622f07426c0d4b86442872ae.zip
gst/spectrum/gstspectrum.c: Use dispose and finalize. Dispose can be called multiple times.
Original commit message from CVS: * gst/spectrum/gstspectrum.c: Use dispose and finalize. Dispose can be called multiple times.
-rw-r--r--ChangeLog5
-rw-r--r--gst/spectrum/gstspectrum.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d95b5ba..1d068316 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-26 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/spectrum/gstspectrum.c:
+ Use dispose and finalize. Dispose can be called multiple times.
+
2007-11-26 Edgard Lima <edgard.lima@indt.org.br>
* ext/metadata/gstmetadataparse.c: (gst_metadata_parse_init),
diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c
index 85e0540f..1382f260 100644
--- a/gst/spectrum/gstspectrum.c
+++ b/gst/spectrum/gstspectrum.c
@@ -136,6 +136,7 @@ GST_BOILERPLATE (GstSpectrum, gst_spectrum, GstAudioFilter,
GST_TYPE_AUDIO_FILTER);
static void gst_spectrum_dispose (GObject * object);
+static void gst_spectrum_finalize (GObject * object);
static void gst_spectrum_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_spectrum_get_property (GObject * object, guint prop_id,
@@ -177,6 +178,7 @@ gst_spectrum_class_init (GstSpectrumClass * klass)
gobject_class->set_property = gst_spectrum_set_property;
gobject_class->get_property = gst_spectrum_get_property;
gobject_class->dispose = gst_spectrum_dispose;
+ gobject_class->finalize = gst_spectrum_finalize;
trans_class->start = GST_DEBUG_FUNCPTR (gst_spectrum_start);
trans_class->stop = GST_DEBUG_FUNCPTR (gst_spectrum_stop);
@@ -245,6 +247,14 @@ gst_spectrum_dispose (GObject * object)
spectrum->adapter = NULL;
}
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gst_spectrum_finalize (GObject * object)
+{
+ GstSpectrum *spectrum = GST_SPECTRUM (object);
+
g_free (spectrum->in);
if (spectrum->fft_free_func) {
spectrum->fft_free_func (spectrum->fft_ctx);
@@ -260,7 +270,7 @@ gst_spectrum_dispose (GObject * object)
spectrum->spect_phase = NULL;
spectrum->freqdata = NULL;
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void