uvch264src: fix small leak in caps query handler

gst_query_set_caps_result() does not take ownership of the caps.
This commit is contained in:
Tim-Philipp Müller 2015-06-22 09:23:12 +01:00
parent dd3f3142bc
commit 1a182e7a41

View file

@ -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;