mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
webrtc: fix ice control mode when we offer initially
An initial offer means we have a local description not a remote description. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1332 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1358>
This commit is contained in:
parent
4997cde699
commit
0f41c0f000
1 changed files with 6 additions and 2 deletions
|
@ -4461,13 +4461,17 @@ _set_description_task (GstWebRTCBin * webrtc, struct set_description *sd)
|
|||
{
|
||||
gboolean ice_controller = FALSE;
|
||||
|
||||
/* get the current value so we don't change ice controller from TRUE to
|
||||
* FALSE on renegotiation or once set to TRUE for the initial local offer */
|
||||
g_object_get (webrtc->priv->ice, "controller", &ice_controller, NULL);
|
||||
|
||||
/* we control ice negotiation if we send the initial offer */
|
||||
ice_controller |=
|
||||
new_signaling_state == GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
|
||||
new_signaling_state == GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
|
||||
&& webrtc->current_remote_description == NULL;
|
||||
/* or, if the remote is an ice-lite peer */
|
||||
ice_controller |= new_signaling_state == GST_WEBRTC_SIGNALING_STATE_STABLE
|
||||
&& webrtc->current_remote_description->type == GST_WEBRTC_SDP_TYPE_OFFER
|
||||
&& webrtc->current_remote_description
|
||||
&& _message_has_attribute_key (webrtc->current_remote_description->sdp,
|
||||
"ice-lite");
|
||||
|
||||
|
|
Loading…
Reference in a new issue