summaryrefslogtreecommitdiffstats
path: root/gst/modplug
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-03-21 16:02:09 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-03-21 16:02:09 +0000
commit2fd4b22a8367f75995501822e772055ef8318d82 (patch)
treedafae0c774558a5aef6797df42757d191ff21707 /gst/modplug
parent353131d32dc96f14bb9b8f1b36e433b1d209cc1d (diff)
downloadgst-plugins-bad-2fd4b22a8367f75995501822e772055ef8318d82.tar.gz
gst-plugins-bad-2fd4b22a8367f75995501822e772055ef8318d82.tar.bz2
gst-plugins-bad-2fd4b22a8367f75995501822e772055ef8318d82.zip
gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355).
Original commit message from CVS: * gst/modplug/libmodplug/load_ptm.cpp: Fix compilation with gcc-4.1 and -Werror (#327355).
Diffstat (limited to 'gst/modplug')
-rw-r--r--gst/modplug/libmodplug/load_ptm.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gst/modplug/libmodplug/load_ptm.cpp b/gst/modplug/libmodplug/load_ptm.cpp
index 8a4d7ac6..278c0aa1 100644
--- a/gst/modplug/libmodplug/load_ptm.cpp
+++ b/gst/modplug/libmodplug/load_ptm.cpp
@@ -120,10 +120,15 @@ BOOL CSoundFile::ReadPTM(const BYTE *lpStream, DWORD dwMemLength)
{
UINT smpflg = RS_PCM8D;
DWORD samplepos;
- pins->nLength = bswapLE32(*(LPDWORD)(psmp->length));
- pins->nLoopStart = bswapLE32(*(LPDWORD)(psmp->loopbeg));
- pins->nLoopEnd = bswapLE32(*(LPDWORD)(psmp->loopend));
- samplepos = bswapLE32(*(LPDWORD)(&psmp->fileofs));
+ DWORD psmp_length, psmp_loopbeg, psmp_loopend, psmp_fileofs;
+ memcpy (&psmp_length, (void *) psmp->length, sizeof (DWORD));
+ memcpy (&psmp_loopbeg, (void *) psmp->loopbeg, sizeof (DWORD));
+ memcpy (&psmp_loopend, (void *) psmp->loopend, sizeof (DWORD));
+ memcpy (&psmp_fileofs, (void *) psmp->fileofs, sizeof (DWORD));
+ pins->nLength = bswapLE32(psmp_length);
+ pins->nLoopStart = bswapLE32(psmp_loopbeg);
+ pins->nLoopEnd = bswapLE32(psmp_loopend);
+ samplepos = bswapLE32(psmp_fileofs);
if (psmp->sampletype & 4) pins->uFlags |= CHN_LOOP;
if (psmp->sampletype & 8) pins->uFlags |= CHN_PINGPONGLOOP;
if (psmp->sampletype & 16)