[FFmpeg-cvslog] base64: 10l endian fix.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 23 00:11:56 CET 2012


On Sun, Jan 22, 2012 at 11:08:27PM +0100, Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 22 23:04:20 2012 +0100| [2bb7396bfdb29a4187162cb098808c7d08f7f43b] | committer: Michael Niedermayer
> 
> base64: 10l endian fix.
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2bb7396bfdb29a4187162cb098808c7d08f7f43b
> ---
> 
>  libavutil/base64.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavutil/base64.c b/libavutil/base64.c
> index 1be7b7c..d907805 100644
> --- a/libavutil/base64.c
> +++ b/libavutil/base64.c
> @@ -90,7 +90,7 @@ int av_base64_decode(uint8_t *out, const char *in_str, int out_size)
>          BASE64_DEC_STEP(2);
>          BASE64_DEC_STEP(3);
>          // Using AV_WB32 directly confuses compiler
> -        v = av_be2ne32(v) >> 8;
> +        v = av_be2ne32(v << 8);

Hm.
Problem is that that confuses the compiler again.
This seems to work on little-endian at least:
-        v = av_be2ne32(v << 8);
+        v = HAVE_BIGENDIAN ? v << 8 : av_bswap32(v) >> 8;

I can't decide on whether or what to do about the compiler
messing up av_bswap32.


More information about the ffmpeg-cvslog mailing list