capsdebug: Don't leak pad templates created from static pad templates
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 19 Dec 2010 09:22:29 +0000 (10:22 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 19 Dec 2010 09:22:29 +0000 (10:22 +0100)
gst/debugutils/gstcapsdebug.c

index f4a1743..469408c 100644 (file)
@@ -103,8 +103,7 @@ gst_caps_debug_init (GstCapsDebug * capsdebug,
 {
 
   capsdebug->srcpad =
-      gst_pad_new_from_template (gst_static_pad_template_get
-      (&gst_caps_debug_src_template), "src");
+      gst_pad_new_from_static_template (&gst_caps_debug_src_template, "src");
   gst_pad_set_getcaps_function (capsdebug->srcpad,
       GST_DEBUG_FUNCPTR (gst_caps_debug_getcaps));
   gst_pad_set_acceptcaps_function (capsdebug->srcpad,
@@ -112,8 +111,7 @@ gst_caps_debug_init (GstCapsDebug * capsdebug,
   gst_element_add_pad (GST_ELEMENT (capsdebug), capsdebug->srcpad);
 
   capsdebug->sinkpad =
-      gst_pad_new_from_template (gst_static_pad_template_get
-      (&gst_caps_debug_sink_template), "sink");
+      gst_pad_new_from_static_template (&gst_caps_debug_sink_template, "sink");
   gst_pad_set_chain_function (capsdebug->sinkpad,
       GST_DEBUG_FUNCPTR (gst_caps_debug_sink_chain));
   gst_pad_set_bufferalloc_function (capsdebug->sinkpad,