summaryrefslogtreecommitdiff
path: root/gst/frei0r
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 /gst/frei0r
parente2fba4003863edb39ecd779204818497bbddb652 (diff)
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 'gst/frei0r')
-rw-r--r--gst/frei0r/gstfrei0rfilter.c1
-rw-r--r--gst/frei0r/gstfrei0rsrc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/gst/frei0r/gstfrei0rfilter.c b/gst/frei0r/gstfrei0rfilter.c
index 0cb15c6ee..ba0d40532 100644
--- a/gst/frei0r/gstfrei0rfilter.c
+++ b/gst/frei0r/gstfrei0rfilter.c
@@ -232,6 +232,7 @@ gst_frei0r_filter_class_init (GstFrei0rFilterClass * klass,
templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps);
gst_element_class_add_pad_template (gstelement_class, templ);
+ gst_caps_unref (caps);
gsttrans_class->set_caps = GST_DEBUG_FUNCPTR (gst_frei0r_filter_set_caps);
gsttrans_class->stop = GST_DEBUG_FUNCPTR (gst_frei0r_filter_stop);
diff --git a/gst/frei0r/gstfrei0rsrc.c b/gst/frei0r/gstfrei0rsrc.c
index e5cf41205..eb3c010fd 100644
--- a/gst/frei0r/gstfrei0rsrc.c
+++ b/gst/frei0r/gstfrei0rsrc.c
@@ -348,6 +348,7 @@ gst_frei0r_src_class_init (GstFrei0rSrcClass * klass,
templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps);
gst_element_class_add_pad_template (gstelement_class, templ);
+ gst_caps_unref (caps);
gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_frei0r_src_set_caps);
gstbasesrc_class->is_seekable =