[FFmpeg-cvslog] postproc: fix unaligned access

Carl Eugen Hoyos git at videolan.org
Tue Feb 23 15:52:19 CET 2016


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Feb 23 15:50:28 2016 +0100| [2aa21eec1adcb3737be59f0eab7081c5a790faa9] | committer: Carl Eugen Hoyos

postproc: fix unaligned access

Based on 59074310 by Andreas Cadhalpun.
Fixes ticket #5259.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2aa21eec1adcb3737be59f0eab7081c5a790faa9
---

 libpostproc/postprocess.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 3b86f93..1dc719c 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -973,7 +973,7 @@ void  pp_postprocess(const uint8_t * src[3], const int srcStride[3],
         int i;
         const int count= FFMAX(mbHeight * absQPStride, mbWidth);
         for(i=0; i<(count>>2); i++){
-            ((uint32_t*)c->stdQPTable)[i] = (((const uint32_t*)QP_store)[i]>>1) & 0x7F7F7F7F;
+            AV_WN32(c->stdQPTable + (i<<2), AV_RN32(QP_store + (i<<2)) >> 1 & 0x7F7F7F7F);
         }
         for(i<<=2; i<count; i++){
             c->stdQPTable[i] = QP_store[i]>>1;



More information about the ffmpeg-cvslog mailing list