[Ffmpeg-cvslog] r5664 - in trunk: libavcodec/flac.c libavutil/common.h

Måns Rullgård mru
Sat Jul 8 14:49:03 CEST 2006


michael <subversion at mplayerhq.hu> writes:

> +#define GET_UTF8(val, GET_BYTE, ERROR)\
> +    val= GET_BYTE;\
> +    {\
> +        int ones= 7 - av_log2(val ^ 255);\
> +        if(ones==1)\
> +            ERROR\
> +        val&= 127>>ones;\
> +        while(--ones > 0){\
> +            int tmp= GET_BYTE - 128;\
> +            if(tmp>>6)\
> +                ERROR\
> +            val= (val<<6) + tmp;\
> +        }\
> +    }

That should be wrapped in a do { } while(0) to avoid surprises.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-cvslog mailing list