* @filtercaps: the filter #GstCaps.
*
* Links the source pad and the sink pad, constrained
- * by the given filter caps.
+ * by the given filter caps. This function sinks the caps.
*
* Returns: TRUE if the pads have been linked, FALSE otherwise.
*/
"start relink filtered %s:%s and %s:%s, clearing caps",
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
- /* FIXME does this leak? */
gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsrc)), NULL);
gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsink)), NULL);
gst_caps_replace (&GST_RPAD_FILTER (realsrc), NULL);
filtered_intersection = gst_caps_intersect (intersection,
filtercaps);
- gst_caps_unref (intersection);
+ gst_caps_sink (intersection);
if (!filtered_intersection) {
GST_INFO (GST_CAT_PADS,
* are equal to the same thing on both */
gst_caps_replace_sink (&GST_RPAD_FILTER (realsrc), intersection);
gst_caps_replace_sink (&GST_RPAD_FILTER (realsink), intersection);
- gst_caps_unref (intersection);
+ gst_caps_sink (intersection);
return gst_pad_perform_negotiate (GST_PAD (realsrc), GST_PAD (realsink));
}