]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp3.c
Merge commit '10306e9c5fcc28bd9310a9b38f21540e9e1433e9'
[ffmpeg] / libavcodec / vp3.c
index 1783041c20dbfba8a638d460b058ec29a3e9790f..1df168bd509d2a0318d7b86bf5c7bd2e7935342c 100644 (file)
@@ -1740,7 +1740,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
     ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
 
     for (i = 0; i < 64; i++) {
-#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
+#define TRANSPOSE(x) (((x) >> 3) | (((x) & 7) << 3))
         s->idct_permutation[i] = TRANSPOSE(i);
         s->idct_scantable[i]   = TRANSPOSE(ff_zigzag_direct[i]);
 #undef TRANSPOSE
@@ -2279,6 +2279,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
         av_reduce(&avctx->sample_aspect_ratio.num,
                   &avctx->sample_aspect_ratio.den,
                   aspect.num, aspect.den, 1 << 30);
+        ff_set_sar(avctx, avctx->sample_aspect_ratio);
     }
 
     if (s->theora < 0x030200)