srt: Don't attempt to reconnect on authentication failures

This is a fatal issue which can't be recovered

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1550

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7797>
This commit is contained in:
Edward Hervey 2024-10-29 11:29:05 +01:00 committed by GStreamer Marge Bot
parent f408cda172
commit 4a41f6f3fe

View file

@ -732,6 +732,8 @@ gst_srt_object_install_properties_helper (GObjectClass * gobject_class)
* Boolean to choose whether to automatically reconnect. If TRUE, an element
* in caller mode will try to reconnect instead of reporting an error.
*
* This will be ignored for authentication failures.
*
* Since: 1.22
*
*/
@ -1600,6 +1602,8 @@ retry:
g_set_error (&internal_error, GST_RESOURCE_ERROR,
GST_RESOURCE_ERROR_NOT_AUTHORIZED,
"Failed to authenticate: %" REASON_FORMAT, REASON_ARGS (reason));
/* Failure to authenticate are fatal */
auto_reconnect = FALSE;
} else {
g_set_error (&internal_error, GST_RESOURCE_ERROR,
GST_RESOURCE_ERROR_READ,