summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorJeff Downs <heydowns@borg.com>2009-05-27 18:59:24 +0000
committerJeff Downs <heydowns@borg.com>2009-05-27 18:59:24 +0000
commit50352827f6444cf74fe37de9827c3ebb9a55fbcb (patch)
tree82963e05035de2435582d673903f321c10311e55 /libavcodec/lcldec.c
parent6125d8659712d27dbc5459b54a84876981a7af3a (diff)
downloadffmpeg-50352827f6444cf74fe37de9827c3ebb9a55fbcb.tar.gz
Use AV_R/WN32 instead of direct integer copying.
Fixes decoding on at least Sparc/Solaris where unaligned accesses cause crashes. ML thread: http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/91414 Originally committed as revision 18967 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index e4114f88ca..8b31b5fa00 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -129,7 +129,7 @@ static unsigned int mszh_decomp(unsigned char * srcptr, int srclen, unsigned cha
if ((mask & (1 << (--maskbit))) == 0) {
if (destptr + 4 > destptr_end)
break;
- *(int*)destptr = *(int*)srcptr;
+ AV_WN32(destptr, AV_RN32(srcptr));
srclen -= 4;
destptr += 4;
srcptr += 4;