Mercurial > libavutil.hg
changeset 658:cc7c1ea68a52 libavutil
Cosmetics: rename the "size" parameter of av_base64_encode() to "in_size".
author | stefano |
---|---|
date | Sun, 08 Feb 2009 21:16:36 +0000 |
parents | 50112fafa1ef |
children | d3cd35bec3d0 |
files | base64.c base64.h |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/base64.c Sun Feb 08 21:13:11 2009 +0000 +++ b/base64.c Sun Feb 08 21:16:36 2009 +0000 @@ -69,17 +69,17 @@ * Fixed edge cases and made it work from data (vs. strings) by Ryan. *****************************************************************************/ -char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size) +char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size) { static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char *ret, *dst; unsigned i_bits = 0; int i_shift = 0; - int bytes_remaining = size; + int bytes_remaining = in_size; - if (size >= UINT_MAX / 4 || - out_size < (size+2) / 3 * 4 + 1) + if (in_size >= UINT_MAX / 4 || + out_size < (in_size+2) / 3 * 4 + 1) return NULL; ret = dst = out; while (bytes_remaining) {
--- a/base64.h Sun Feb 08 21:13:11 2009 +0000 +++ b/base64.h Sun Feb 08 21:16:36 2009 +0000 @@ -34,6 +34,6 @@ * @param src data, not a string * @param buf output string */ -char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size); +char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); #endif /* AVUTIL_BASE64_H */