[FFmpeg-cvslog] r18967 - trunk/libavcodec/lcldec.c

heydowns subversion
Wed May 27 20:59:25 CEST 2009


Author: heydowns
Date: Wed May 27 20:59:24 2009
New Revision: 18967

Log:
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

Modified:
   trunk/libavcodec/lcldec.c

Modified: trunk/libavcodec/lcldec.c
==============================================================================
--- trunk/libavcodec/lcldec.c	Wed May 27 08:58:22 2009	(r18966)
+++ trunk/libavcodec/lcldec.c	Wed May 27 20:59:24 2009	(r18967)
@@ -129,7 +129,7 @@ static unsigned int mszh_decomp(unsigned
         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;



More information about the ffmpeg-cvslog mailing list