[MPlayer-dev-eng] [PATCH] Drop MPlayer base64_encode for av_base64_encode

Clément Bœsch ubitux at gmail.com
Tue Nov 30 12:01:47 CET 2010


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp.py
Type: text/x-python
Size: 868 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20101130/94e23e82/attachment.py>


More information about the MPlayer-dev-eng mailing list