Mercurial > libavutil.hg
comparison base64.c @ 930:7c8cc500e1f4 libavutil
Use AV_BASE64_SIZE() macro
author | hyc |
---|---|
date | Fri, 04 Jun 2010 01:15:41 +0000 |
parents | 0795a743bda1 |
children |
comparison
equal
deleted
inserted
replaced
929:d0be85c9c96f | 930:7c8cc500e1f4 |
---|---|
77 unsigned i_bits = 0; | 77 unsigned i_bits = 0; |
78 int i_shift = 0; | 78 int i_shift = 0; |
79 int bytes_remaining = in_size; | 79 int bytes_remaining = in_size; |
80 | 80 |
81 if (in_size >= UINT_MAX / 4 || | 81 if (in_size >= UINT_MAX / 4 || |
82 out_size < (in_size+2) / 3 * 4 + 1) | 82 out_size < AV_BASE64_SIZE(in_size)) |
83 return NULL; | 83 return NULL; |
84 ret = dst = out; | 84 ret = dst = out; |
85 while (bytes_remaining) { | 85 while (bytes_remaining) { |
86 i_bits = (i_bits << 8) + *in++; | 86 i_bits = (i_bits << 8) + *in++; |
87 bytes_remaining--; | 87 bytes_remaining--; |