summaryrefslogtreecommitdiffstats
path: root/gst/equalizer
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-01-18 07:03:23 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-01-18 07:03:23 +0000
commit6fcf22d5a38e78f27af8bbfa3a515cc6b306202d (patch)
treed78546cbda499193d702045a0bafecee3d69ff6c /gst/equalizer
parent5761e2f21287c274d752d9d3900ff7af78712de3 (diff)
gst/equalizer/gstiirequalizer.c: Unparent all bands from the equalizer when finalizing to stop leaking them.
Original commit message from CVS: * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_finalize): Unparent all bands from the equalizer when finalizing to stop leaking them.
Diffstat (limited to 'gst/equalizer')
-rw-r--r--gst/equalizer/gstiirequalizer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c
index 54e8abc5..684e8843 100644
--- a/gst/equalizer/gstiirequalizer.c
+++ b/gst/equalizer/gstiirequalizer.c
@@ -340,6 +340,14 @@ static void
gst_iir_equalizer_finalize (GObject * object)
{
GstIirEqualizer *equ = GST_IIR_EQUALIZER (object);
+ gint i;
+
+ for (i = 0; i < equ->freq_band_count; i++) {
+ if (equ->bands[i])
+ gst_object_unparent (GST_OBJECT (equ->bands[i]));
+ equ->bands[i] = NULL;
+ }
+ equ->freq_band_count = 0;
g_free (equ->bands);
g_free (equ->history);