mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
pad: fix locking order error
This commit is contained in:
parent
fda5685a15
commit
d890017021
1 changed files with 6 additions and 3 deletions
|
@ -395,6 +395,7 @@ replace_event (GstPad * srcpad, GstPad * sinkpad, guint idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* srcpad and sinkpad LOCK must be taken */
|
||||||
static void
|
static void
|
||||||
prepare_event_update (GstPad * srcpad, GstPad * sinkpad)
|
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 */
|
/* Doing the expensive caps checking takes priority over only checking the template caps */
|
||||||
if (flags & GST_PAD_LINK_CHECK_CAPS) {
|
if (flags & GST_PAD_LINK_CHECK_CAPS) {
|
||||||
GST_OBJECT_UNLOCK (src);
|
|
||||||
srccaps = gst_pad_query_caps (src, NULL);
|
|
||||||
GST_OBJECT_LOCK (src);
|
|
||||||
GST_OBJECT_UNLOCK (sink);
|
GST_OBJECT_UNLOCK (sink);
|
||||||
|
GST_OBJECT_UNLOCK (src);
|
||||||
|
|
||||||
|
srccaps = gst_pad_query_caps (src, NULL);
|
||||||
sinkcaps = gst_pad_query_caps (sink, NULL);
|
sinkcaps = gst_pad_query_caps (sink, NULL);
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (src);
|
||||||
GST_OBJECT_LOCK (sink);
|
GST_OBJECT_LOCK (sink);
|
||||||
} else {
|
} else {
|
||||||
/* If one of the two pads doesn't have a template, consider the intersection
|
/* If one of the two pads doesn't have a template, consider the intersection
|
||||||
|
|
Loading…
Reference in a new issue