summaryrefslogtreecommitdiff
path: root/gst/dvbsuboverlay
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2014-08-09 13:09:52 +0200
committerTim-Philipp Müller <tim@centricular.com>2014-08-10 11:56:56 +0100
commit128cbf4f575ed66f8b177b02cf91740fb7e8043a (patch)
tree7f4ac680fb3759dd27f471a7ea0beb40fe746155 /gst/dvbsuboverlay
parentee09d332bdb7bb3ed18589492d9838a8af9000ea (diff)
downloadgstreamer-plugins-bad-128cbf4f575ed66f8b177b02cf91740fb7e8043a.tar.gz
dvbsuboverlay: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced, so creating a copy using gst_caps_copy() results in a reference leak. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734528
Diffstat (limited to 'gst/dvbsuboverlay')
-rw-r--r--gst/dvbsuboverlay/gstdvbsuboverlay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c
index eaf1ca19c..de6508478 100644
--- a/gst/dvbsuboverlay/gstdvbsuboverlay.c
+++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c
@@ -549,7 +549,7 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
if (gst_caps_is_any (peer_caps)) {
/* if peer returns ANY caps, return filtered src pad template caps */
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (srcpad));
+ caps = gst_pad_get_pad_template_caps (srcpad);
if (filter) {
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
GST_CAPS_INTERSECT_FIRST);
@@ -617,7 +617,7 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
if (gst_caps_is_any (peer_caps)) {
/* if peer returns ANY caps, return filtered sink pad template caps */
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (sinkpad));
+ caps = gst_pad_get_pad_template_caps (sinkpad);
if (filter) {
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
GST_CAPS_INTERSECT_FIRST);