[FFmpeg-devel] [PATCH] Fix 4XM decoding on big-endian and unaligned reads

Reimar Döffinger Reimar.Doeffinger
Thu Nov 11 21:37:34 CET 2010


On Thu, Nov 11, 2010 at 09:31:51PM +0100, Vitor Sessak wrote:
> +#define LE_CENTRIC_MUL(dst, src, scale, dc) \
> +    { \
> +        *((uint32_t *) (dst)) = AV_RL32(src) * (scale) + (dc); \
> +    }

Regardless of my other comment, using AV_WN32A would avoid any potential aliasing
issues.
Also if you already add {} to the macro you could go for the proper
do { .. } while (0) (or remove the {}, I don't really care).



More information about the ffmpeg-devel mailing list