}
+/* srcpad and sinkpad LOCK must be taken */
static void
prepare_event_update (GstPad * srcpad, GstPad * sinkpad)
{
/* Doing the expensive caps checking takes priority over only checking the template caps */
if (flags & GST_PAD_LINK_CHECK_CAPS) {
+ GST_OBJECT_UNLOCK (sink);
GST_OBJECT_UNLOCK (src);
+
srccaps = gst_pad_query_caps (src, NULL);
- GST_OBJECT_LOCK (src);
- GST_OBJECT_UNLOCK (sink);
sinkcaps = gst_pad_query_caps (sink, NULL);
+
+ GST_OBJECT_LOCK (src);
GST_OBJECT_LOCK (sink);
} else {
/* If one of the two pads doesn't have a template, consider the intersection