[FFmpeg-cvslog] avcodec/vp56: Add () to protect TRANSPOSE()s arguments

Michael Niedermayer git at videolan.org
Tue Feb 17 20:14:23 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 17 18:57:26 2015 +0100| [03dab49a1267630375c4fc15dec1136814b1f117] | committer: Michael Niedermayer

avcodec/vp56: Add () to protect TRANSPOSE()s arguments

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/vp56.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 8571cf3..6319248 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -701,7 +701,7 @@ av_cold int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s,
     ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
     ff_vp56dsp_init(&s->vp56dsp, avctx->codec->id);
     for (i = 0; i < 64; i++) {
-#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
+#define TRANSPOSE(x) (((x) >> 3) | (((x) & 7) << 3))
         s->idct_scantable[i] = TRANSPOSE(ff_zigzag_direct[i]);
 #undef TRANSPOSE
     }



More information about the ffmpeg-cvslog mailing list