diff --git a/ChangeLog b/ChangeLog index 8cdc4be550..a7e7cb29b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-14 Wim Taymans + + * gst/gstpad.c: (gst_pad_peer_accept_caps): + Release pad lock before calling out to avoid a possible deadlock. + 2008-05-14 Wim Taymans * gst/parse/grammar.y: diff --git a/gst/gstpad.c b/gst/gstpad.c index 4a1fa5bcde..86d7d5437a 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -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: