comparison libswscale/swscale.c @ 30298:c37405b37538

Add a const qualifier in a cast, fix the gcc warning: swscale.c: In function ¡ÆplanarCopy¡Ç: swscale.c:2256: warning: cast discards qualifiers from pointer target type
author stefano
date Sun, 17 Jan 2010 00:21:50 +0000
parents 826441351ad5
children e054adfb8849
comparison
equal deleted inserted replaced
30297:111076138c5e 30298:c37405b37538
2251 } else if(is16BPS(c->srcFormat) && is16BPS(c->dstFormat) 2251 } else if(is16BPS(c->srcFormat) && is16BPS(c->dstFormat)
2252 && isBE(c->srcFormat) != isBE(c->dstFormat)) { 2252 && isBE(c->srcFormat) != isBE(c->dstFormat)) {
2253 2253
2254 for (i=0; i<height; i++) { 2254 for (i=0; i<height; i++) {
2255 for (j=0; j<length; j++) 2255 for (j=0; j<length; j++)
2256 ((uint16_t*)dstPtr)[j] = bswap_16(((uint16_t*)srcPtr)[j]); 2256 ((uint16_t*)dstPtr)[j] = bswap_16(((const uint16_t*)srcPtr)[j]);
2257 srcPtr+= srcStride[plane]; 2257 srcPtr+= srcStride[plane];
2258 dstPtr+= dstStride[plane]; 2258 dstPtr+= dstStride[plane];
2259 } 2259 }
2260 } else if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0) 2260 } else if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0)
2261 memcpy(dst[plane] + dstStride[plane]*y, src[plane], height*dstStride[plane]); 2261 memcpy(dst[plane] + dstStride[plane]*y, src[plane], height*dstStride[plane]);