# HG changeset patch # User stefano # Date 1234127591 0 # Node ID 50112fafa1efac9cbb1ee9dc848f21c3e456f77a # Parent eadb97de8dc0ca0045a74933f55cba2da38f2da6 Cosmetics: prefer out/in over buf/src for the parameter names of av_base64_encode(), for consistency/readability reasons. diff -r eadb97de8dc0 -r 50112fafa1ef base64.c --- a/base64.c Sun Feb 08 21:08:42 2009 +0000 +++ b/base64.c Sun Feb 08 21:13:11 2009 +0000 @@ -69,7 +69,7 @@ * Fixed edge cases and made it work from data (vs. strings) by Ryan. *****************************************************************************/ -char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size) +char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size) { static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -79,11 +79,11 @@ int bytes_remaining = size; if (size >= UINT_MAX / 4 || - buf_size < (size+2) / 3 * 4 + 1) + out_size < (size+2) / 3 * 4 + 1) return NULL; - ret = dst = buf; + ret = dst = out; while (bytes_remaining) { - i_bits = (i_bits << 8) + *src++; + i_bits = (i_bits << 8) + *in++; bytes_remaining--; i_shift += 8; diff -r eadb97de8dc0 -r 50112fafa1ef base64.h --- a/base64.h Sun Feb 08 21:08:42 2009 +0000 +++ b/base64.h Sun Feb 08 21:13:11 2009 +0000 @@ -34,6 +34,6 @@ * @param src data, not a string * @param buf output string */ -char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size); +char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size); #endif /* AVUTIL_BASE64_H */