Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Fix a caps memory leak introduced by the last change.
2008-12-09 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/gstutils.c: (gst_element_get_compatible_pad):
+ Fix a caps memory leak introduced by the last change.
+
+2008-12-09 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ * gst/gstutils.c: (gst_element_get_compatible_pad):
Check if the caps of the pads are compatible before returning
a pad and claiming it is compatible. This, among other things,
fixes a bug with gst-launch where an incompatible pad is chosen
intersection = temp2;
if (!gst_caps_is_empty (intersection)) {
+ gst_caps_unref (intersection);
+
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"found existing unlinked compatible pad %s:%s",
GST_DEBUG_PAD_NAME (current));
return current;
}
+ gst_caps_unref (intersection);
}
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "unreffing pads");