[SCM] libav/experimental: swscale: fix an implementation-defined unsigned-to-signed conversion

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:02:47 UTC 2014


The following commit has been merged in the experimental branch:
commit 60c4660ba035bbfbcc84ac34129ce40e037c70ad
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date:   Sat Apr 5 14:05:19 2014 -0400

    swscale: fix an implementation-defined unsigned-to-signed conversion

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 3a956f4..daa6f5f 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list