]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/targa_y216dec.c
avcodec/takdec: Fix runtime error: left shift of negative value -42
[ffmpeg] / libavcodec / targa_y216dec.c
index 21b3d35d672214f72423da26336e0eefc9448535..443d48a92f29fec4492eb96685fb798fa2b31a34 100644 (file)
@@ -35,7 +35,8 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data,
 {
     AVFrame *pic = data;
     const uint16_t *src = (uint16_t *)avpkt->data;
-    uint16_t *y, *u, *v, aligned_width = FFALIGN(avctx->width, 4);
+    uint16_t *y, *u, *v;
+    int aligned_width = FFALIGN(avctx->width, 4);
     int i, j, ret;
 
     if (avpkt->size < 4 * avctx->height * aligned_width) {