summaryrefslogtreecommitdiff
path: root/gst/pnm/gstpnmenc.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-11-27 20:13:38 -0800
committerDavid Schleef <ds@schleef.org>2010-11-30 18:54:46 -0800
commit159e2768d6729aea2caffb14a6f56a7055d4879f (patch)
tree8039b1b14d7290e2f78c64124e0ba9236a7bb5be /gst/pnm/gstpnmenc.c
parent4eee2dc95d4ae84462426e9487c2a70b07de01a7 (diff)
downloadgstreamer-plugins-bad-159e2768d6729aea2caffb14a6f56a7055d4879f.tar.gz
Fix pad template memleaks
Pad templates returned by gst_static_pad_template_get() were not being unreffed.
Diffstat (limited to 'gst/pnm/gstpnmenc.c')
-rw-r--r--gst/pnm/gstpnmenc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c
index a197e6fe9..53bd4a3ff 100644
--- a/gst/pnm/gstpnmenc.c
+++ b/gst/pnm/gstpnmenc.c
@@ -216,17 +216,13 @@ gst_pnmenc_init (GstPnmenc * s, GstPnmencClass * klass)
{
GstPad *pad;
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&sink_pad_template), "sink");
+ pad = gst_pad_new_from_static_template (&sink_pad_template, "sink");
gst_pad_set_setcaps_function (pad, gst_pnmenc_setcaps_func_sink);
gst_pad_set_chain_function (pad, gst_pnmenc_chain);
gst_pad_use_fixed_caps (pad);
gst_element_add_pad (GST_ELEMENT (s), pad);
- s->src =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&src_pad_template), "src");
+ s->src = gst_pad_new_from_static_template (&src_pad_template, "src");
gst_element_add_pad (GST_ELEMENT (s), s->src);
}