diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2016-05-18 12:12:15 +0300 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2016-05-25 13:40:54 -0400 |
commit | 1840fa93630b5e3c2e87b011111fdba560bec6cf (patch) | |
tree | 680098d9ed0acfbe31b319dc5b42791b0afd605d /sys | |
parent | 3d979d4e879f1c18ffa64ecfd9887669eba97220 (diff) |
v4l2object: fix caps leak
gst_v4l2_object_probe_caps() was taking an extra ref on the returned
caps for no reason.
https://bugzilla.gnome.org/show_bug.cgi?id=766610
Diffstat (limited to 'sys')
-rw-r--r-- | sys/v4l2/gstv4l2object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index da83d0875..05258ca0d 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -3867,9 +3867,11 @@ gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, GstCaps * filter) } if (filter) { + GstCaps *tmp; + + tmp = ret; ret = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); - } else { - ret = gst_caps_ref (ret); + gst_caps_unref (tmp); } return ret; |