gst/gstpad.c: Release pad lock before calling out to avoid a possible deadlock.

Original commit message from CVS:
* gst/gstpad.c: (gst_pad_peer_accept_caps):
Release pad lock before calling out to avoid a possible deadlock.
This commit is contained in:
Wim Taymans 2008-05-14 13:52:59 +00:00
parent 363148faf4
commit 98db43c6f0
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-05-14 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstpad.c: (gst_pad_peer_accept_caps):
Release pad lock before calling out to avoid a possible deadlock.
2008-05-14 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/parse/grammar.y:

View file

@ -2327,9 +2327,14 @@ gst_pad_peer_accept_caps (GstPad * pad, GstCaps * caps)
if (G_UNLIKELY (peerpad == NULL))
goto no_peer;
result = gst_pad_accept_caps (peerpad, caps);
gst_object_ref (peerpad);
/* release lock before calling external methods but keep ref to pad */
GST_OBJECT_UNLOCK (pad);
result = gst_pad_accept_caps (peerpad, caps);
gst_object_unref (peerpad);
return result;
no_peer: