summaryrefslogtreecommitdiff
path: root/gst/pnm
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
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')
-rw-r--r--gst/pnm/gstpnmdec.c7
-rw-r--r--gst/pnm/gstpnmenc.c8
2 files changed, 4 insertions, 11 deletions
diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c
index 060af2dcc..394e86d12 100644
--- a/gst/pnm/gstpnmdec.c
+++ b/gst/pnm/gstpnmdec.c
@@ -295,14 +295,11 @@ gst_pnmdec_init (GstPnmdec * s, GstPnmdecClass * klass)
GstPad *pad;
pad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&gst_pnmdec_sink_pad_template), "sink");
+ gst_pad_new_from_static_template (&gst_pnmdec_sink_pad_template, "sink");
gst_pad_set_chain_function (pad, gst_pnmdec_chain);
gst_element_add_pad (GST_ELEMENT (s), pad);
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&gst_pnmdec_src_pad_template), "src");
+ pad = gst_pad_new_from_static_template (&gst_pnmdec_src_pad_template, "src");
gst_element_add_pad (GST_ELEMENT (s), pad);
}
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);
}