Use AV_BASE64_SIZE() macro

Originally committed as revision 23462 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Howard Chu
2010-06-04 01:15:41 +00:00
parent 31878fcf43
commit 784824a68c
3 changed files with 3 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
int bytes_remaining = in_size;
if (in_size >= UINT_MAX / 4 ||
out_size < (in_size+2) / 3 * 4 + 1)
out_size < AV_BASE64_SIZE(in_size))
return NULL;
ret = dst = out;
while (bytes_remaining) {