v410enc: fix undefined signed left shift caused by integer promotion
authorJanne Grunau <janne-libav@jannau.net>
Mon, 2 Jan 2012 14:47:26 +0000 (15:47 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Mon, 2 Jan 2012 18:20:23 +0000 (19:20 +0100)
libavcodec/v410enc.c

index 95b36c1..11c6abc 100644 (file)
@@ -67,7 +67,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
         for (j = 0; j < avctx->width; j++) {
             val  = u[j] << 2;
             val |= y[j] << 12;
-            val |= v[j] << 22;
+            val |= (uint32_t) v[j] << 22;
             AV_WL32(dst, val);
             dst += 4;
             output_size += 4;