[Ffmpeg-devel] [PATCH] Base64 code

Ryan Martell rdm4
Fri Oct 27 18:49:33 CEST 2006


Attached are two files for libavformat, base64.c & h.

I took the b64_encode from http.c, and then implemented the  
b64_decode (per Michael's suggestions).

I modified the b64_encode to make it comply with the specification  
(sometimes it needs two == on the end), and to not take strings as  
input (since it should be encoding data, not strings).

The http.c stuff could have had authentication problems before, due  
to the == issues.

The large chunk of code at the bottom is for testing, and is #ifdef'd  
out.  If anyone has any other edge cases that they would like me to  
check on, I will.

If these are accepted, I will submit a separate patch for the  
Makefile and http.c to make it use this code.

Thanks,
-Ryan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: base64.c
Type: application/octet-stream
Size: 7463 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061027/226eb159/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: base64.h
Type: application/octet-stream
Size: 999 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061027/226eb159/attachment-0001.obj>
-------------- next part --------------




More information about the ffmpeg-devel mailing list