From 800b4bdb2692d00d5725baa3c4f790bdec5e1d62 Mon Sep 17 00:00:00 2001 From: Trond Andersen Date: Wed, 7 Apr 2010 15:31:52 +0200 Subject: [PATCH] rtpbin: Unlock before adding pad in new_payload_found Holding internal locks while potentially calling out is a source of deadlocks, and in this case the application might subscribe to the pad-added signal. Fixes #630449 --- gst/rtpmanager/gstrtpbin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 277007aa49..085fe8b43d 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2150,9 +2150,10 @@ new_payload_found (GstElement * element, guint pt, GstPad * pad, gst_pad_set_caps (gpad, GST_PAD_CAPS (pad)); gst_pad_set_active (gpad, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad); GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); + gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad); + return; shutdown: