webrtcbin: Stop transceivers update after first SDP error

When invalid SDP is supplied, _update_transceiver_from_sdp_media() sets the
GError, so it is invalid to continue any further SDP processing, we have to exit
early when the first error is raised.

Fixes #1595

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2254>
This commit is contained in:
Philippe Normand 2021-05-17 10:49:41 +01:00 committed by GStreamer Marge Bot
parent b1541a7470
commit 064428cb34

View file

@ -4865,6 +4865,8 @@ _update_transceivers_from_sdp (GstWebRTCBin * webrtc, SDPSource source,
_update_transceiver_from_sdp_media (webrtc, sdp->sdp, i, stream,
trans, bundled, bundle_idx, error);
if (error && *error)
goto done;
} else if (_message_media_is_datachannel (sdp->sdp, i)) {
_update_data_channel_from_sdp_media (webrtc, sdp->sdp, i, stream,
error);