[FFmpeg-devel] [PATCH]RTSP Basic Authentication

Stefano Sabatini stefano.sabatini-lala
Sun Mar 1 18:38:49 CET 2009


On date Saturday 2009-02-28 16:52:08 -0500, Ronald S. Bultje encoded:
> Hi Luca,
> 
> On Sat, Feb 28, 2009 at 4:33 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
> > Ronald S. Bultje wrote:
> >> http.c does *4/3+12. I don't know why it does +12. The documentation
> >> of _encode() is in line with what I wrote above (except that it
> >> doesn't use ceil() but some simpler integer-only equivalent). Probably
> >> a bug in http.c. Attached patch fixes this.
> >
> > I found the +12 in other places as well I don't remember why or where ^^;
> 
> I had a quick look in files matching grep base64_decode/encode and
> didn't find anything. :-).

svn log -r17065 may help.

The +12 depends on the previous implementation, which required an
overallocation for the output buffer of av_base64_encode(), and so it
was required (len * 4 / 3 + 12) for the output buffer.

Now it requires the exact size used, that is (len+2) / 3 * 4 + 1.

Regards.



-- 
FFmpeg = Foolish Funny Minimal Puristic Elaborated Ghost




More information about the ffmpeg-devel mailing list