summaryrefslogtreecommitdiffstats
path: root/gst/flx/flx_color.c
diff options
context:
space:
mode:
authorZeeshan Ali <zeenix@gmail.com>2005-12-11 16:43:42 +0000
committerZeeshan Ali <zeenix@gmail.com>2005-12-11 16:43:42 +0000
commit8b6d639c5dec7e488792ca67c70d9fda161ac0ce (patch)
tree23ef6b3d3b5bd5b1a534bda52985e29e715b8b63 /gst/flx/flx_color.c
parent81e11ca107dfb6efea2fea28a7186d2180cc3374 (diff)
Now flxdec works on big-endian machines as well.
Original commit message from CVS: Now flxdec works on big-endian machines as well.
Diffstat (limited to 'gst/flx/flx_color.c')
-rw-r--r--gst/flx/flx_color.c8
1 files changed, 8 insertions, 0 deletions
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
}
}