Browse code

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

Stefano Sabatini authored on 2009/02/09 06:13:11
Showing 2 changed files
... ...
@@ -69,7 +69,7 @@ int av_base64_decode(uint8_t * out, const char *in, int out_size)
69 69
 * Fixed edge cases and made it work from data (vs. strings) by Ryan.
70 70
 *****************************************************************************/
71 71
 
72
-char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size)
72
+char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size)
73 73
 {
74 74
     static const char b64[] =
75 75
         "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
... ...
@@ -79,11 +79,11 @@ char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size)
79 79
     int bytes_remaining = size;
80 80
 
81 81
     if (size >= UINT_MAX / 4 ||
82
-        buf_size < (size+2) / 3 * 4 + 1)
82
+        out_size < (size+2) / 3 * 4 + 1)
83 83
         return NULL;
84
-    ret = dst = buf;
84
+    ret = dst = out;
85 85
     while (bytes_remaining) {
86
-        i_bits = (i_bits << 8) + *src++;
86
+        i_bits = (i_bits << 8) + *in++;
87 87
         bytes_remaining--;
88 88
         i_shift += 8;
89 89
 
... ...
@@ -34,6 +34,6 @@ int av_base64_decode(uint8_t * out, const char *in, int out_size);
34 34
  * @param src data, not a string
35 35
  * @param buf output string
36 36
  */
37
-char *av_base64_encode(char * buf, int buf_size, const uint8_t * src, int size);
37
+char *av_base64_encode(char *out, int out_size, const uint8_t *in, int size);
38 38
 
39 39
 #endif /* AVUTIL_BASE64_H */