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
This commit is contained in:
Guillaume Desmottes 2016-05-18 12:12:15 +03:00 committed by Nicolas Dufresne
parent 3d979d4e87
commit 1840fa9363

View file

@ -3867,9 +3867,11 @@ gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, GstCaps * filter)
} }
if (filter) { if (filter) {
GstCaps *tmp;
tmp = ret;
ret = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); ret = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST);
} else { gst_caps_unref (tmp);
ret = gst_caps_ref (ret);
} }
return ret; return ret;