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
This commit is contained in:
Trond Andersen 2010-04-07 15:31:52 +02:00 committed by Wim Taymans
parent 062568a9f5
commit 800b4bdb26

View file

@ -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_caps (gpad, GST_PAD_CAPS (pad));
gst_pad_set_active (gpad, TRUE); gst_pad_set_active (gpad, TRUE);
gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad);
GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin); GST_RTP_BIN_SHUTDOWN_UNLOCK (rtpbin);
gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), gpad);
return; return;
shutdown: shutdown: