rtmp2: Allow NULL flash version, omitting the field

rtmpsink omits it by default. Allow us to do the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5241>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-08-24 17:40:42 +02:00
parent 8ebdefcbb7
commit 14c097e87d

View file

@ -602,13 +602,6 @@ send_connect (GTask * task)
goto out; goto out;
} }
if (!flash_ver) {
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_INITIALIZED,
"Flash version is not set");
g_object_unref (task);
goto out;
}
if (data->auth_query) { if (data->auth_query) {
const gchar *query = data->auth_query; const gchar *query = data->auth_query;
appstr = g_strdup_printf ("%s?%s", app, query); appstr = g_strdup_printf ("%s?%s", app, query);
@ -649,9 +642,11 @@ send_connect (GTask * task)
gst_amf_node_append_field_string (node, "type", "nonprivate", -1); gst_amf_node_append_field_string (node, "type", "nonprivate", -1);
} }
/* "Flash Player version. It is the same string as returned by the if (flash_ver) {
* ApplicationScript getversion () function." */ /* "Flash Player version. It is the same string as returned by the
gst_amf_node_append_field_string (node, "flashVer", flash_ver, -1); * ApplicationScript getversion () function." */
gst_amf_node_append_field_string (node, "flashVer", flash_ver, -1);
}
/* "URL of the source SWF file making the connection." /* "URL of the source SWF file making the connection."
* XXX: libavformat sends "swfUrl" here, if provided. */ * XXX: libavformat sends "swfUrl" here, if provided. */