summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-06-22 09:23:12 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-06-22 09:23:12 +0100
commit1a182e7a414c36e29d27f49a1cd50e5811b8e272 (patch)
treea042c9dd11b32d19a9ef6df715397f1e7c65581a
parentdd3f3142bca5e8750f17d2fdde4c0a689059f319 (diff)
uvch264src: fix small leak in caps query handler
gst_query_set_caps_result() does not take ownership of the caps.
-rw-r--r--sys/uvch264/gstuvch264_src.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/uvch264/gstuvch264_src.c b/sys/uvch264/gstuvch264_src.c
index 5ef6c966b..94c09fa95 100644
--- a/sys/uvch264/gstuvch264_src.c
+++ b/sys/uvch264/gstuvch264_src.c
@@ -3064,14 +3064,18 @@ gst_uvc_h264_src_getcaps (GstPad * pad, GstObject * parent, GstQuery * query)
static gboolean
gst_uvc_h264_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
- gboolean ret = FALSE;
+ gboolean ret;
switch (GST_QUERY_TYPE (query)) {
- case GST_QUERY_CAPS:
- gst_query_set_caps_result (query,
- gst_uvc_h264_src_getcaps (pad, parent, query));
+ case GST_QUERY_CAPS:{
+ GstCaps *caps;
+
+ caps = gst_uvc_h264_src_getcaps (pad, parent, query);
+ gst_query_set_caps_result (query, caps);
+ gst_caps_unref (caps);
ret = TRUE;
break;
+ }
default:
ret = gst_pad_query_default (pad, parent, query);
break;