diff options
author | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-16 12:54:58 +0000 |
---|---|---|
committer | Eduard Hasenleithner <ehasenle@users.sourceforge.net> | 2001-08-16 12:54:58 +0000 |
commit | 2b2cf1c784a95fc8d03e5b4d35d4f0b7785fd64c (patch) | |
tree | a658fdd4a06f4e9984a7bec4bdbafe9f860f38cd | |
parent | f97eaa174cdc767a986550c710a98bb2877a01f1 (diff) | |
download | xine-lib-2b2cf1c784a95fc8d03e5b4d35d4f0b7785fd64c.tar.gz xine-lib-2b2cf1c784a95fc8d03e5b4d35d4f0b7785fd64c.tar.bz2 |
Changes for new byte order of clut_t.
CVS patchset: 435
CVS date: 2001/08/16 12:54:58
-rw-r--r-- | src/dxr3/dxr3_decoder.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c index 689ebadb3..e08088bc1 100644 --- a/src/dxr3/dxr3_decoder.c +++ b/src/dxr3/dxr3_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dxr3_decoder.c,v 1.11 2001/08/14 19:43:43 ehasenle Exp $ + * $Id: dxr3_decoder.c,v 1.12 2001/08/16 12:54:58 ehasenle Exp $ * * dxr3 video and spu decoder plugin. Accepts the video and spu data * from XINE and sends it directly to the corresponding dxr3 devices. @@ -321,7 +321,8 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) ssize_t written; if (buf->type == BUF_SPU_CLUT) { - swab_clut((int*)buf->content); + if (buf->content[0] == 0) /* cheap endianess detection */ + swab_clut((int*)buf->content); if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_SETPALETTE, buf->content)) fprintf(stderr, "dxr3: failed to set CLUT (%s)\n", strerror(errno)); return; @@ -390,7 +391,9 @@ static void spudec_event (spu_decoder_t *this_gen, spu_event_t *event) { case SPU_EVENT_CLUT: { spu_cltbl_t *clut = event->data; +#ifdef WORDS_BIGENDIAN swab_clut(clut->clut); +#endif if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_SETPALETTE, clut->clut)) fprintf(stderr, "dxr3: failed to set CLUT (%s)\n", |