mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
rtsp: use glib base64 encoder
--
This commit is contained in:
parent
b7ea2a9105
commit
3a72044a22
1 changed files with 7 additions and 5 deletions
|
@ -855,11 +855,13 @@ add_auth_header (GstRTSPConnection * conn, GstRTSPMessage * message)
|
||||||
{
|
{
|
||||||
switch (conn->auth_method) {
|
switch (conn->auth_method) {
|
||||||
case GST_RTSP_AUTH_BASIC:{
|
case GST_RTSP_AUTH_BASIC:{
|
||||||
gchar *user_pass =
|
gchar *user_pass;
|
||||||
g_strdup_printf ("%s:%s", conn->username, conn->passwd);
|
gchar *user_pass64;
|
||||||
gchar *user_pass64 =
|
gchar *auth_string;
|
||||||
gst_rtsp_base64_encode (user_pass, strlen (user_pass));
|
|
||||||
gchar *auth_string = g_strdup_printf ("Basic %s", user_pass64);
|
user_pass = g_strdup_printf ("%s:%s", conn->username, conn->passwd);
|
||||||
|
user_pass64 = g_base64_encode ((guchar *) user_pass, strlen (user_pass));
|
||||||
|
auth_string = g_strdup_printf ("Basic %s", user_pass64);
|
||||||
|
|
||||||
gst_rtsp_message_take_header (message, GST_RTSP_HDR_AUTHORIZATION,
|
gst_rtsp_message_take_header (message, GST_RTSP_HDR_AUTHORIZATION,
|
||||||
auth_string);
|
auth_string);
|
||||||
|
|
Loading…
Reference in a new issue