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

This commit is contained in:
Justin Ruggles 2014-04-05 14:05:19 -04:00
parent d4a8a86c68
commit 60c4660ba0
1 changed files with 2 additions and 2 deletions

View 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;