summaryrefslogtreecommitdiff
path: root/gst/gstpad.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-11-21 17:43:51 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2011-11-21 17:43:51 +0100
commitd8900170213fd1a5fee770ca715b25c2e4df4e83 (patch)
tree52a7b352726c4221ecbd8cdc0ac4bd34bfb565d6 /gst/gstpad.c
parentfda5685a152a1ed97dcf661f09a1ee7c0c8e5288 (diff)
downloadgstreamer-d8900170213fd1a5fee770ca715b25c2e4df4e83.tar.gz
pad: fix locking order error
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r--gst/gstpad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 79211d93ff..4c5b2aa2b7 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -395,6 +395,7 @@ replace_event (GstPad * srcpad, GstPad * sinkpad, guint idx)
}
+/* srcpad and sinkpad LOCK must be taken */
static void
prepare_event_update (GstPad * srcpad, GstPad * sinkpad)
{
@@ -1598,11 +1599,13 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink,
/* 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