mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
webrtcbin: Clear errors from finding codec preferences before the next iteration
The media is just skipped and the error is not propagated to the caller, so keeping it around here would cause assertions a bit later when trying to set a new error over the old one. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1291>
This commit is contained in:
parent
30153f1591
commit
f9a97efbe1
1 changed files with 7 additions and 1 deletions
|
@ -3966,10 +3966,16 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
|
|||
|
||||
if (0) {
|
||||
rejected:
|
||||
GST_INFO_OBJECT (webrtc, "media %u rejected", i);
|
||||
if (error && *error)
|
||||
GST_INFO_OBJECT (webrtc, "media %u rejected: %s", i, (*error)->message);
|
||||
else
|
||||
GST_INFO_OBJECT (webrtc, "media %u rejected", i);
|
||||
gst_sdp_media_free (media);
|
||||
gst_sdp_media_copy (offer_media, &media);
|
||||
gst_sdp_media_set_port_info (media, 0, 0);
|
||||
/* Clear error here as it is not propagated to the caller and the media
|
||||
* is just skipped, i.e. more iterations are going to happen. */
|
||||
g_clear_error (error);
|
||||
}
|
||||
gst_sdp_message_add_media (ret, media);
|
||||
gst_sdp_media_free (media);
|
||||
|
|
Loading…
Reference in a new issue