summaryrefslogtreecommitdiff
path: root/gst/aiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-17 00:23:08 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-17 00:25:49 +0100
commit63d629aba560512a97e36699be16f840f7603b97 (patch)
tree1812e28e50c4a5120870431c63aa5dca046134a4 /gst/aiff
parentddcfe3ddf38660280cbd5d73a32bba5128a70685 (diff)
downloadgstreamer-plugins-bad-63d629aba560512a97e36699be16f840f7603b97.tar.gz
aiffparse: don't leak adapter
Diffstat (limited to 'gst/aiff')
-rw-r--r--gst/aiff/aiffparse.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c
index 183e0b9e1..eaa1b819e 100644
--- a/gst/aiff/aiffparse.c
+++ b/gst/aiff/aiffparse.c
@@ -1645,13 +1645,17 @@ gst_aiff_parse_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
gboolean res;
GstAiffParse *aiff = GST_AIFF_PARSE (parent);
- if (aiff->adapter)
+ if (aiff->adapter) {
g_object_unref (aiff->adapter);
+ aiff->adapter = NULL;
+ }
switch (mode) {
case GST_PAD_MODE_PUSH:
- aiff->streaming = TRUE;
- aiff->adapter = gst_adapter_new ();
+ if (active) {
+ aiff->streaming = TRUE;
+ aiff->adapter = gst_adapter_new ();
+ }
res = TRUE;
break;
case GST_PAD_MODE_PULL: