[FFmpeg-devel] [PATCH 3/3] base64: simplify end handling in av_base64_encode()

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jan 20 23:33:44 CET 2012


On Fri, Jan 20, 2012 at 10:57:20PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavutil/base64.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/libavutil/base64.c b/libavutil/base64.c
> index 80ab44b..7b58c53 100644
> --- a/libavutil/base64.c
> +++ b/libavutil/base64.c
> @@ -97,13 +97,11 @@ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
>          bytes_remaining--;
>          i_shift += 8;
>  
> -        do {
> -            *dst++ = b64[(i_bits << 6 >> i_shift) & 0x3f];
> -            i_shift -= 6;
> -        } while (i_shift > 6);
>      }

I'd also remove that empty line.
Looks good to me otherwise.


More information about the ffmpeg-devel mailing list