1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Cosmetics: prefer out/in over buf/src for the parameter names of

av_base64_encode(), for consistency/readability reasons.

Originally committed as revision 17069 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2009-02-08 21:13:11 +00:00
parent 18099ade6f
commit 52ef50a080
2 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ int av_base64_decode(uint8_t * out, const char *in, int out_size)
* Fixed edge cases and made it work from data (vs. strings) by Ryan. * 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[] = static const char b64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@ -79,11 +79,11 @@ char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size)
int bytes_remaining = size; int bytes_remaining = size;
if (size >= UINT_MAX / 4 || if (size >= UINT_MAX / 4 ||
buf_size < (size+2) / 3 * 4 + 1) out_size < (size+2) / 3 * 4 + 1)
return NULL; return NULL;
ret = dst = buf; ret = dst = out;
while (bytes_remaining) { while (bytes_remaining) {
i_bits = (i_bits << 8) + *src++; i_bits = (i_bits << 8) + *in++;
bytes_remaining--; bytes_remaining--;
i_shift += 8; i_shift += 8;

View File

@ -34,6 +34,6 @@ int av_base64_decode(uint8_t * out, const char *in, int out_size);
* @param src data, not a string * @param src data, not a string
* @param buf output 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 */ #endif /* AVUTIL_BASE64_H */