From 8b6d639c5dec7e488792ca67c70d9fda161ac0ce Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Date: Sun, 11 Dec 2005 16:43:42 +0000 Subject: Now flxdec works on big-endian machines as well. Original commit message from CVS: Now flxdec works on big-endian machines as well. --- gst/flx/flx_color.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gst/flx/flx_color.c') diff --git a/gst/flx/flx_color.c b/gst/flx/flx_color.c index 73846845..854010a4 100644 --- a/gst/flx/flx_color.c +++ b/gst/flx/flx_color.c @@ -60,10 +60,18 @@ flx_colorspace_convert (FlxColorSpaceConverter * flxpal, guchar * src, while (size--) { col = (*src++ * 3); + +#if G_BYTE_ORDER == G_BIG_ENDIAN + *dest++ = 0; + *dest++ = flxpal->palvec[col]; + *dest++ = flxpal->palvec[col + 1]; + *dest++ = flxpal->palvec[col + 2]; +#else *dest++ = flxpal->palvec[col + 2]; *dest++ = flxpal->palvec[col + 1]; *dest++ = flxpal->palvec[col]; *dest++ = 0; +#endif } } -- cgit