mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
rtmp2/client: Make sure 'desc' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
This commit is contained in:
parent
e2fa6916a9
commit
1bc0e9e1cb
1 changed files with 3 additions and 3 deletions
|
@ -746,15 +746,15 @@ send_connect_done (const gchar * command_name, GPtrArray * args,
|
||||||
GstUri *query;
|
GstUri *query;
|
||||||
|
|
||||||
node = gst_amf_node_get_field (optional_args, "description");
|
node = gst_amf_node_get_field (optional_args, "description");
|
||||||
if (!node) {
|
desc = node ? gst_amf_node_peek_string (node, NULL) : NULL;
|
||||||
|
if (!desc) {
|
||||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
|
||||||
"Connect rejected; no description");
|
"Connect rejected; no description");
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
desc = gst_amf_node_peek_string (node, NULL);
|
GST_DEBUG ("connect result desc: %s", desc);
|
||||||
GST_DEBUG ("connect result desc: %s", GST_STR_NULL (desc));
|
|
||||||
|
|
||||||
if (authmod == GST_RTMP_AUTHMOD_AUTO && strstr (desc, "code=403 need auth")) {
|
if (authmod == GST_RTMP_AUTHMOD_AUTO && strstr (desc, "code=403 need auth")) {
|
||||||
if (strstr (desc, "authmod=adobe")) {
|
if (strstr (desc, "authmod=adobe")) {
|
||||||
|
|
Loading…
Reference in a new issue