diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-12-19 12:05:11 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-12-19 12:05:11 +0100 |
commit | 9605ff9aa8ebf7473d299555b5a20ee99b383db3 (patch) | |
tree | b813e9d03d841e936b03e7ad5203114cb74a25ee /gst/camerabin2 | |
parent | 073916c9fb92dd4c18f16a3eb159064bace4c6f3 (diff) |
imagecapturebin: Don't leak pad template created from static pad template
Diffstat (limited to 'gst/camerabin2')
-rw-r--r-- | gst/camerabin2/gstimagecapturebin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/camerabin2/gstimagecapturebin.c b/gst/camerabin2/gstimagecapturebin.c index 367232e32..1ff5fe2bc 100644 --- a/gst/camerabin2/gstimagecapturebin.c +++ b/gst/camerabin2/gstimagecapturebin.c @@ -150,9 +150,13 @@ static void gst_image_capture_bin_init (GstImageCaptureBin * image_capturebin, GstImageCaptureBinClass * image_capturebin_class) { + GstPadTemplate *tmpl; + + tmpl = gst_static_pad_template_get (&sink_template); image_capturebin->ghostpad = - gst_ghost_pad_new_no_target_from_template ("sink", - gst_static_pad_template_get (&sink_template)); + gst_ghost_pad_new_no_target_from_template ("sink", tmpl); + gst_object_unref (tmpl); + gst_element_add_pad (GST_ELEMENT_CAST (image_capturebin), image_capturebin->ghostpad); |