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/7776>
This commit is contained in:
Edward Hervey 2024-10-29 11:29:05 +01:00 committed by GStreamer Marge Bot
parent 5ad8258a7d
commit 35e19134d1

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