GNOME Bugzilla – Bug 636827
Usage of gst_caps_interset where gst_caps_can_intersect was intended?
Last modified: 2010-12-09 07:41:13 UTC
In commit f5469d42deb05fcc32f1226ff6c25d9dd978dc43 gst_caps_intersect was changed to gst_caps_can_intersect however on line 2090, gst_caps_intersect was used: - intersection = gst_caps_intersect (xvimagesink->xcontext->caps, caps); - GST_DEBUG_OBJECT (xvimagesink, "intersection returned %" GST_PTR_FORMAT, - intersection); - if (gst_caps_is_empty (intersection)) + if (!gst_caps_intersect (xvimagesink->xcontext->caps, caps)) goto incompatible_caps; - gst_caps_unref (intersection); - I believe this is leading to a leak of the resulting caps when there is an intersection. I can supply some valgrind results if necessary.
Yes, you're right. Thanks for spotting commit b00f8a5b363a8f2b5eeb0431c25d5d2b00b0af49 Author: Gavin Stark <g.stark@realdigitalmedia.com> Date: Thu Dec 9 08:40:25 2010 +0100 xvimagesink: Use gst_caps_can_intersect() instead of gst_caps_intersect() Fixes a memory leak and bug #636827.