mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
rtmp2/client: Make sure 'reason' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
This commit is contained in:
parent
a13f234be3
commit
dcada94046
1 changed files with 9 additions and 1 deletions
|
@ -822,6 +822,14 @@ send_connect_done (const gchar * command_name, GPtrArray * args,
|
|||
{
|
||||
const gchar *reason = gst_uri_get_query_value (query, "reason");
|
||||
|
||||
if (!reason) {
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||
"authentication failed; no reason: %s", desc);
|
||||
g_object_unref (task);
|
||||
gst_uri_unref (query);
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_str_equal (reason, "authfailed")) {
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||
"authentication failed! wrong credentials?");
|
||||
|
@ -832,7 +840,7 @@ send_connect_done (const gchar * command_name, GPtrArray * args,
|
|||
|
||||
if (!g_str_equal (reason, "needauth")) {
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||
"unhandled rejection reason '%s'", reason ? reason : "");
|
||||
"unhandled rejection reason '%s'", reason);
|
||||
g_object_unref (task);
|
||||
gst_uri_unref (query);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue