From ed4d1cee0e62792d4e9272021c40f06163b831e0 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 16 Nov 2005 12:57:51 +0000 Subject: [PATCH] fix pad tempalte leak in tee Original commit message from CVS: fix pad tempalte leak in tee --- ChangeLog | 5 +++++ gst/elements/gsttee.c | 7 ++++--- plugins/elements/gsttee.c | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24eb7f8..3060ac9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-11-16 Thomas Vander Stichele + * gst/elements/gsttee.c: (gst_tee_init): + fix pad tempalte leak in tee + +2005-11-16 Thomas Vander Stichele + * gst/glib-compat.c: (g_value_dup_gst_object): * gst/glib-compat.h: * gst/gstpad.c: (gst_pad_set_property): diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index b452752..aa78353 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -140,9 +140,10 @@ gst_tee_class_init (GstTeeClass * klass) static void gst_tee_init (GstTee * tee, GstTeeClass * g_class) { - tee->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), - "sink"); + GstPadTemplate *templ = gst_static_pad_template_get (&sinktemplate); + + tee->sinkpad = gst_pad_new_from_template (templ, "sink"); + gst_object_unref (templ); gst_pad_set_setcaps_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_setcaps)); gst_pad_set_getcaps_function (tee->sinkpad, diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index b452752..aa78353 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -140,9 +140,10 @@ gst_tee_class_init (GstTeeClass * klass) static void gst_tee_init (GstTee * tee, GstTeeClass * g_class) { - tee->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), - "sink"); + GstPadTemplate *templ = gst_static_pad_template_get (&sinktemplate); + + tee->sinkpad = gst_pad_new_from_template (templ, "sink"); + gst_object_unref (templ); gst_pad_set_setcaps_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_setcaps)); gst_pad_set_getcaps_function (tee->sinkpad, -- 2.7.4