[MPlayer-dev-eng] Correctly Printing FOURCCs

Mike Melanson melanson at pcisys.net
Thu Feb 28 16:12:09 CET 2002


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.

	Thanks...
--
	-Mike Melanson




More information about the MPlayer-dev-eng mailing list