Skip to content

Commit

Permalink
Cosmetics: rename the "size" parameter of av_base64_encode() to "in_s…
Browse files Browse the repository at this point in the history
…ize".

Originally committed as revision 17071 to svn://svn.ffmpeg.org/ffmpeg/trunk
  • Loading branch information
Stefano Sabatini committed Feb 8, 2009
1 parent 1cc65ce commit 5118bd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libavutil/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ 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.
*****************************************************************************/

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) {
Expand Down
2 changes: 1 addition & 1 deletion libavutil/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ int av_base64_decode(uint8_t * out, const char *in, int out_size);
* @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 */

0 comments on commit 5118bd4

Please sign in to comment.