summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorGarima Gaur <garima.g@samsung.com>2017-01-03 09:02:36 +0530
committerTim-Philipp Müller <tim@centricular.com>2017-01-03 10:02:58 +0000
commit81b0a14d692bb679c5688ef597e5aab6f0ce7730 (patch)
tree7d680e89eee7615ff7780d0c9418636b2daf50fa /sys/vdpau
parente2fba4003863edb39ecd779204818497bbddb652 (diff)
downloadgstreamer-plugins-bad-81b0a14d692bb679c5688ef597e5aab6f0ce7730.tar.gz
Fix some caps leaks in pad template creation code
gst_pad_template_new() does not take ownership of the caps passed to it, so we need to unref the caps. https://bugzilla.gnome.org/show_bug.cgi?id=776790 https://bugzilla.gnome.org/show_bug.cgi?id=776787
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/gstvdpvideopostprocess.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vdpau/gstvdpvideopostprocess.c b/sys/vdpau/gstvdpvideopostprocess.c
index 5afe5cd41..7f4f480a4 100644
--- a/sys/vdpau/gstvdpvideopostprocess.c
+++ b/sys/vdpau/gstvdpvideopostprocess.c
@@ -1233,12 +1233,14 @@ gst_vdp_vpp_class_init (GstVdpVideoPostProcessClass * klass)
src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
src_caps);
gst_element_class_add_pad_template (gstelement_class, src_template);
+ gst_caps_unref (src_caps);
/* SINK PAD */
sink_caps = gst_vdp_video_buffer_get_caps (FALSE, 0);
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
sink_caps);
gst_element_class_add_pad_template (gstelement_class, sink_template);
+ gst_caps_unref (sink_caps);
}
static void