swscale: fix an implementation-defined unsigned-to-signed conversion
authorJustin Ruggles <justin.ruggles@gmail.com>
Sat, 5 Apr 2014 18:05:19 +0000 (14:05 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 12 Apr 2014 17:24:47 +0000 (13:24 -0400)
libswscale/swscale_unscaled.c

index 3a956f4..daa6f5f 100644 (file)
@@ -1187,9 +1187,9 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
 
     if (usePal(c->srcFormat)) {
         for (i = 0; i < 256; i++) {
-            int p, r, g, b, y, u, v;
+            int r, g, b, y, u, v;
             if (c->srcFormat == AV_PIX_FMT_PAL8) {
-                p = ((const uint32_t *)(srcSlice[1]))[i];
+                uint32_t p = ((const uint32_t *)(srcSlice[1]))[i];
                 r = (p >> 16) & 0xFF;
                 g = (p >>  8) & 0xFF;
                 b =  p        & 0xFF;