[MPlayer-dev-eng] Correctly Printing FOURCCs

Arpi arpi at thot.banki.hu
Thu Feb 28 16:33:07 CET 2002


Hi,

> Hi team,
> 	This is a terribly minor, nagging issue that only affects
> big-endian users. The following code:
>   unsigned int fourcc;
>   printf ("fourcc: %.4s", (char *)&fourcc);
> prints the FOURCC backwards on big endian systems ('MARC' instead of
> 'CRAM', ' war' instead of 'raw '). I wanted to make a macro that will
> break it down into 4 printable chars, like so:
>   printf ("fourcc: %c%c%c%c", FOURCC_PRINTF_PARMS(fourcc));
> The macro will be replaced with the appropriate bit shifts. There are a
> bunch of files I'll have to touch to fix up all the %.4s modifiers. Just a
> heads up. If there are no serious objections and no one has a better
> solution, I'll get going on it tonight.

do it. but the macro name should be shorter, maybe SPLITFOURCC


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list