[MPlayer-dev-eng] [PATCH] #define __BSD_VISIBLE to 1

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 16 18:38:37 CET 2014


On Sun, Feb 16, 2014 at 06:16:14PM +0100, Alexander Strasser wrote:
> +static void swap_bytes(uint8_t * buf, int size)
> +{
> +   uint16_t * p = (uint16_t *)buf;
> +   size -= size & 1;
> +   while (size > 0) {
> +     *p = bswap_16(*p);
> +     ++p;
> +     size -= 2;
> +   }

While that matches what swab does, I am not sure the odd size handling
is actually correct for dnet.
Also avoiding the cast and aliasing issues and using some AV_* macros
might make sense.


More information about the MPlayer-dev-eng mailing list