[MPlayer-dev-eng] Correctly Printing FOURCCs

Arpi arpi at thot.banki.hu
Thu Feb 28 16:38:04 CET 2002


Hi,

> >   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));

ahh, and someone should test this with gcc 3.x first.
as it handles printf as macro, weird things used to happen when we use
tricky macros or #if together with printf :(


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