summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2007-02-23 19:12:52 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2007-02-23 19:12:52 +0000
commit825cf238bb7a97fb7be42ca4a9fd7ad93f094adc (patch)
treeea4d3992d5d24bd0021a18b39eeeee7cdc728b59 /gst
parent66df66daa21fe69c698a4a46173a3ac011bd65a1 (diff)
gst/rtsp/: g_base64_encode is a GLib 2.12 function. Use an equivalent taken from icecast to replace it. Relicensed fr...
Original commit message from CVS: * gst/rtsp/Makefile.am: * gst/rtsp/rtspconnection.c: (append_auth_header), (rtsp_connection_send), (rtsp_connection_set_auth): g_base64_encode is a GLib 2.12 function. Use an equivalent taken from icecast to replace it. Relicensed from GPL courtesy of Mike Smith.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtsp/Makefile.am5
-rw-r--r--gst/rtsp/rtspconnection.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/gst/rtsp/Makefile.am b/gst/rtsp/Makefile.am
index 51bc003a..ea0b82c7 100644
--- a/gst/rtsp/Makefile.am
+++ b/gst/rtsp/Makefile.am
@@ -8,7 +8,8 @@ libgstrtsp_la_SOURCES = gstrtsp.c gstrtspsrc.c \
rtspmessage.c \
rtsptransport.c \
rtspurl.c \
- sdpmessage.c
+ sdpmessage.c \
+ base64.c
libgstrtsp_la_CFLAGS = $(GST_CFLAGS)
libgstrtsp_la_LIBADD = $(GST_LIBS) $(WIN32_LIBS)
@@ -20,4 +21,4 @@ test_SOURCES = test.c rtspdefs.c rtspurl.c rtspconnection.c rtspmessage.c rtsptr
test_CFLAGS = $(GST_CFLAGS)
test_LDFLAGS = $(GST_LIBS) $(WIN32_LIBS)
-noinst_HEADERS = gstrtspsrc.h gstrtsp.h gstrtpdec.h rtsptransport.h rtsp.h rtspurl.h rtspconnection.h rtspdefs.h rtspmessage.h sdp.h sdpmessage.h rtspextwms.h rtspext.h
+noinst_HEADERS = gstrtspsrc.h gstrtsp.h gstrtpdec.h rtsptransport.h rtsp.h rtspurl.h rtspconnection.h rtspdefs.h rtspmessage.h sdp.h sdpmessage.h rtspextwms.h rtspext.h base64.h
diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c
index 19f5c6df..b3dfba65 100644
--- a/gst/rtsp/rtspconnection.c
+++ b/gst/rtsp/rtspconnection.c
@@ -69,6 +69,7 @@
#endif
#include "rtspconnection.h"
+#include "base64.h"
/* the select call is also performed on the control sockets, that way
* we can send special commands to unlock or restart the select call */
@@ -242,8 +243,7 @@ append_auth_header (RTSPConnection * conn, RTSPMessage * message, GString * str)
case RTSP_AUTH_BASIC:{
gchar *user_pass =
g_strdup_printf ("%s:%s", conn->username, conn->passwd);
- gchar *user_pass64 =
- g_base64_encode ((guchar *) user_pass, strlen (user_pass));
+ gchar *user_pass64 = util_base64_encode (user_pass, strlen (user_pass));
gchar *auth_string = g_strdup_printf ("Basic %s", user_pass64);
append_header (RTSP_HDR_AUTHORIZATION, auth_string, str);