From 3a72044a22c49f0371c6b8fcfb2eb7cefd57aeb3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 9 Mar 2009 13:51:48 +0100 Subject: [PATCH] rtsp: use glib base64 encoder -- --- gst-libs/gst/rtsp/gstrtspconnection.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 8535dcd..d536978 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -855,11 +855,13 @@ add_auth_header (GstRTSPConnection * conn, GstRTSPMessage * message) { switch (conn->auth_method) { case GST_RTSP_AUTH_BASIC:{ - gchar *user_pass = - g_strdup_printf ("%s:%s", conn->username, conn->passwd); - gchar *user_pass64 = - gst_rtsp_base64_encode (user_pass, strlen (user_pass)); - gchar *auth_string = g_strdup_printf ("Basic %s", user_pass64); + gchar *user_pass; + gchar *user_pass64; + gchar *auth_string; + + 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, auth_string); -- 2.7.4