diff options
author | Robin KAY <komadori@users.sourceforge.net> | 2002-10-05 14:39:24 +0000 |
---|---|---|
committer | Robin KAY <komadori@users.sourceforge.net> | 2002-10-05 14:39:24 +0000 |
commit | d7dfcbeb67a733508efe3029bfcf13d3ac53c033 (patch) | |
tree | c71272b312d356ef776e5f862f9fec5294bc14bc /src/demuxers/demux_snd.c | |
parent | 6905b22fbc581c8b518853d3e2edef52f50be1a8 (diff) | |
download | xine-lib-d7dfcbeb67a733508efe3029bfcf13d3ac53c033.tar.gz xine-lib-d7dfcbeb67a733508efe3029bfcf13d3ac53c033.tar.bz2 |
Fixed segmentation faults in endian translation macros (SPARC, gcc 3.2)
CVS patchset: 2785
CVS date: 2002/10/05 14:39:24
Diffstat (limited to 'src/demuxers/demux_snd.c')
-rw-r--r-- | src/demuxers/demux_snd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index edb46bb1b..3eb6dd87b 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -19,7 +19,7 @@ * * SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_snd.c,v 1.8 2002/10/03 00:08:47 tmmm Exp $ + * $Id: demux_snd.c,v 1.9 2002/10/05 14:39:24 komadori Exp $ * */ @@ -41,8 +41,8 @@ #include "buffer.h" #include "bswap.h" -#define BE_16(x) (be2me_16(*(unsigned short *)(x))) -#define BE_32(x) (be2me_32(*(unsigned int *)(x))) +#define BE_16(x) (be2me_16((uint16_t)(x))) +#define BE_32(x) (be2me_32((uint32_t)(x))) #define SND_HEADER_SIZE 24 #define PCM_BLOCK_ALIGN 1024 @@ -196,11 +196,11 @@ static int load_snd_and_send_headers(demux_snd_t *this) { return DEMUX_CANNOT_HANDLE; } - this->data_start = BE_32(&header[0x04]); - this->data_size = BE_32(&header[0x08]); - encoding = BE_32(&header[0x0C]); - this->audio_sample_rate = BE_32(&header[0x10]); - this->audio_channels = BE_32(&header[0x14]); + this->data_start = BE_32(header[0x04]); + this->data_size = BE_32(header[0x08]); + encoding = BE_32(header[0x0C]); + this->audio_sample_rate = BE_32(header[0x10]); + this->audio_channels = BE_32(header[0x14]); /* basic sanity checks on the loaded audio parameters */ if ((!this->audio_sample_rate) || @@ -285,7 +285,7 @@ static int demux_snd_open(demux_plugin_t *this_gen, return DEMUX_CANNOT_HANDLE; /* check the signature */ - if (BE_32(&header[0]) == snd_TAG) + if (BE_32(header[0]) == snd_TAG) return load_snd_and_send_headers(this); return DEMUX_CANNOT_HANDLE; |