[FFmpeg-devel] Questions about av_base64_encode()

Luca Abeni lucabe72
Thu Nov 8 13:01:58 CET 2007


Hi all,

Luca Abeni wrote:
[...]
>>> 2) av_base64_encode() fails if buf_len < len * 4 / 3 + 12...
>>>     Why "+12"? Shouldn't it be "+4", or "+5" (considering the
>>>     0 to terminate the string)? Or am I missing something?
>> dunno, also i dunno why the
>> if(len) is there it seems redundant
> 
> That was my next question ;-)
> 
> 
>> feel free to simplify it
> 
> I am for removing the "if(len)", and changing "+ 12" in "+ 5".
> I'll do some tests, and I'll commit those changes next week,
> if noone disagrees.

I just removed the redundant if, and tomorrow I'll change "+12" in
"+ 5" if noone complains.


			Luca




More information about the ffmpeg-devel mailing list