summaryrefslogtreecommitdiffstats
path: root/gst
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
commit463cd1466bcb040e245813d0c3a3122f67d7b02d (patch)
treeba128f6aa5f79e1746f62b6610a125558dadc660 /gst
parent82b7cfd66217f3070cefd369c5830ee1301d6637 (diff)
downloadgst-plugins-bad-463cd1466bcb040e245813d0c3a3122f67d7b02d.tar.gz
gst-plugins-bad-463cd1466bcb040e245813d0c3a3122f67d7b02d.tar.bz2
gst-plugins-bad-463cd1466bcb040e245813d0c3a3122f67d7b02d.zip
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')
-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);