fix pad tempalte leak in tee
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 16 Nov 2005 12:57:51 +0000 (12:57 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 16 Nov 2005 12:57:51 +0000 (12:57 +0000)
Original commit message from CVS:
fix pad tempalte leak in tee

ChangeLog
gst/elements/gsttee.c
plugins/elements/gsttee.c

index 24eb7f8..3060ac9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-11-16  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/elements/gsttee.c: (gst_tee_init):
+         fix pad tempalte leak in tee
+
+2005-11-16  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * gst/glib-compat.c: (g_value_dup_gst_object):
        * gst/glib-compat.h:
        * gst/gstpad.c: (gst_pad_set_property):
index b452752..aa78353 100644 (file)
@@ -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,
index b452752..aa78353 100644 (file)
@@ -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,