[PATCH] Drop MPlayer base64_encode for av_base64_encode
Hi, Here is a patch to simplify the base64 computing in the stream module. Since libavutil provide a base64 encode, a factorization was possible, and code gets simplified. I tested the http authentication, but I couldn't for the rtsp one. If anyone has an idea of how the RTSP server can reply a 401, I'd like to hear about :) -- Clément B. Not sent from a jesusPhone.
On 11/24/2010 09:48 PM, Clément Bœsch wrote:
Hi,
Here is a patch to simplify the base64 computing in the stream module. Since libavutil provide a base64 encode, a factorization was possible, and code gets simplified.
I tested the http authentication, but I couldn't for the rtsp one. If anyone has an idea of how the RTSP server can reply a 401, I'd like to hear about :)
The patch looks fine, I don't have a realrtsp url to try though =| lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero
On Sat, Nov 27, 2010 at 10:29:40PM +0100, Luca Barbato wrote:
On 11/24/2010 09:48 PM, Clément Bœsch wrote:
Hi,
Here is a patch to simplify the base64 computing in the stream module. Since libavutil provide a base64 encode, a factorization was possible, and code gets simplified.
I tested the http authentication, but I couldn't for the rtsp one. If anyone has an idea of how the RTSP server can reply a 401, I'd like to hear about :)
The patch looks fine, I don't have a realrtsp url to try though =|
I was finally able to test it properly. HTTP: % ./mplayer 'http://login:password@localhost:8000' [...] % echo "\n" | nc -l -p 8000 | grep Basic Authorization: Basic bG9naW46cGFzc3dvcmQ= RealRTSP: % ./mplayer 'rtsp://login:password@localhost:8000' [...] % ./rtsp.py | grep Basic Authorization: Basic bG9naW46cGFzc3dvcmQ= rtsp.py hack script is attached if you want to test. And of course: % python -c 'import base64;print(base64.b64decode(b"bG9naW46cGFzc3dvcmQ="))' login:password I'll commit this in 3 days if no one object. -- Clément B. Not sent from a jesusPhone.
On Tue, Nov 30, 2010 at 12:01:47PM +0100, Clément Bœsch wrote:
On Sat, Nov 27, 2010 at 10:29:40PM +0100, Luca Barbato wrote:
On 11/24/2010 09:48 PM, Clément Bœsch wrote:
Hi,
Here is a patch to simplify the base64 computing in the stream module. Since libavutil provide a base64 encode, a factorization was possible, and code gets simplified.
I tested the http authentication, but I couldn't for the rtsp one. If anyone has an idea of how the RTSP server can reply a 401, I'd like to hear about :)
The patch looks fine, I don't have a realrtsp url to try though =|
I was finally able to test it properly.
HTTP:
% ./mplayer 'http://login:password@localhost:8000' [...]
% echo "\n" | nc -l -p 8000 | grep Basic Authorization: Basic bG9naW46cGFzc3dvcmQ=
RealRTSP:
% ./mplayer 'rtsp://login:password@localhost:8000' [...]
% ./rtsp.py | grep Basic Authorization: Basic bG9naW46cGFzc3dvcmQ=
rtsp.py hack script is attached if you want to test.
And of course:
% python -c 'import base64;print(base64.b64decode(b"bG9naW46cGFzc3dvcmQ="))' login:password
I'll commit this in 3 days if no one object.
Applied. -- Clément B. Not sent from a jesusPhone.
participants (2)
-
Clément Bœsch -
Luca Barbato