Mercurial > libavformat.hg
changeset 1934:aab32293e595 libavformat
expose av_base64_decode and av_base64_encode
author | lu_zero |
---|---|
date | Mon, 19 Mar 2007 00:48:47 +0000 |
parents | eb9eeef16bdb |
children | d86a3bda9418 |
files | http.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/http.c Sun Mar 18 23:59:56 2007 +0000 +++ b/http.c Mon Mar 19 00:48:47 2007 +0000 @@ -210,13 +210,14 @@ int post, err, ch; char line[1024], *q; char *auth_b64; + int auth_b64_len = strlen(auth)* 4 / 3 + 12; offset_t off = s->off; /* send http header */ post = h->flags & URL_WRONLY; - - auth_b64 = av_base64_encode((uint8_t *)auth, strlen(auth)); + auth_b64 = av_malloc(auth_b64_len); + av_base64_encode(auth_b64, auth_b64_len, (uint8_t *)auth, strlen(auth)); snprintf(s->buffer, sizeof(s->buffer), "%s %s HTTP/1.1\r\n" "User-Agent: %s\r\n"