diff options
author | Howard Chu <hyc@highlandsun.com> | 2010-06-04 01:15:07 +0000 |
---|---|---|
committer | Howard Chu <hyc@highlandsun.com> | 2010-06-04 01:15:07 +0000 |
commit | 31878fcf430cf0f0eb39741c65ccee02b22ef785 (patch) | |
tree | 830680052fb2f4cd3b277049a34d5836b9788c67 | |
parent | 27b0d365e8a8e605c84d4c33a74326fb0a8be334 (diff) | |
download | ffmpeg-31878fcf430cf0f0eb39741c65ccee02b22ef785.tar.gz |
Add AV_BASE64_SIZE() macro
Originally committed as revision 23461 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavutil/base64.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/base64.h b/libavutil/base64.h index 103860eff0..477128afab 100644 --- a/libavutil/base64.h +++ b/libavutil/base64.h @@ -46,4 +46,9 @@ int av_base64_decode(uint8_t *out, const char *in, int out_size); */ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); +/** + * Calculate the output size needed to base64-encode x bytes. + */ +#define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) + #endif /* AVUTIL_BASE64_H */ |