diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-11-18 00:33:22 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-11-18 00:33:22 +0000 |
commit | 8a423f8f00c5cb0e1ca9161be39b319967dbccb3 (patch) | |
tree | 0680140b9a3b3722403631bd4881325846596512 | |
parent | 7c5e39664e68700d8895c1873c2a070d1bde3ff8 (diff) |
decodebin: fix one more pad template ref leak
-rw-r--r-- | gst/playback/gstdecodebin.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 13c8ebdd2..854a28dca 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -899,6 +899,7 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, * create a ghostpad for this pad. It's possible that the caps are not * fixed. */ if (mimetype_is_raw (mimetype)) { + GstPadTemplate *tmpl; gchar *padname; GstPad *ghost; PadProbeData *data; @@ -919,8 +920,10 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, decode_bin->numpads++; /* make it a ghostpad */ - ghost = gst_ghost_pad_new_from_template (padname, pad, - gst_static_pad_template_get (&decoder_bin_src_template)); + tmpl = gst_static_pad_template_get (&decoder_bin_src_template); + ghost = gst_ghost_pad_new_from_template (padname, pad, tmpl); + gst_object_unref (tmpl); + gst_pad_set_active (ghost, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); |