diff options
author | Doug Nazar <nazard@nazar.ca> | 2021-05-17 09:11:54 -0400 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-05-19 05:49:48 +0000 |
commit | 4fcfd5b7f9dcde8d3888b58ab04f61d402896b7e (patch) | |
tree | cd5d650ec877ae033571fc602d355a794219fbb1 /ext | |
parent | a836bd476635c5911f95ff8b38dbf7878a2ecc32 (diff) | |
download | gstreamer-plugins-bad-4fcfd5b7f9dcde8d3888b58ab04f61d402896b7e.tar.gz |
webrtcbin: Fix race bringing up sctp data channel
Notifying before pads are linked can cause the stream to fail to start.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2256>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/webrtc/webrtcdatachannel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c index 7988f0fb1..16b81d849 100644 --- a/ext/webrtc/webrtcdatachannel.c +++ b/ext/webrtc/webrtcdatachannel.c @@ -1020,7 +1020,6 @@ _data_channel_set_sctp_transport (WebRTCDataChannel * channel, channel); g_signal_connect (sctp, "notify::state", G_CALLBACK (_on_sctp_notify_state), channel); - _on_sctp_notify_state_unlocked (G_OBJECT (sctp), channel); } GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel); } @@ -1043,6 +1042,8 @@ webrtc_data_channel_link_to_sctp (WebRTCDataChannel * channel, channel->sctp_transport->sctpenc, pad_name)) g_warn_if_reached (); g_free (pad_name); + + _on_sctp_notify_state_unlocked (G_OBJECT (sctp_transport), channel); } } } |