webrtcbin: Return the old state if we ended up being in an unspecified situation

Previously we would've returned NEW, which is usually more wrong.
This commit is contained in:
Sebastian Dröge 2020-01-12 16:32:20 +02:00 committed by GStreamer Merge Bot
parent 22869356db
commit 4b73322333

View file

@ -885,8 +885,8 @@ _collate_ice_connection_states (GstWebRTCBin * webrtc)
return STATE (CONNECTED);
}
GST_FIXME ("unspecified situation, returning new");
return STATE (NEW);
GST_FIXME ("unspecified situation, returning old state");
return webrtc->ice_connection_state;
#undef STATE
}
@ -1115,8 +1115,9 @@ _collate_peer_connection_states (GstWebRTCBin * webrtc)
return STATE (CONNECTED);
}
GST_FIXME_OBJECT (webrtc, "Undefined situation detected, returning new");
return STATE (NEW);
GST_FIXME_OBJECT (webrtc,
"Undefined situation detected, returning old state");
return webrtc->peer_connection_state;
#undef DTLS_STATE
#undef ICE_STATE
#undef STATE