[FFmpeg-devel] [PATCH] fix some warnings in swscale.c

Vitor Sessak vitor1001
Sun Oct 26 16:42:25 CET 2008


Michael Niedermayer wrote:
> On Sat, Oct 25, 2008 at 10:26:45PM +0200, Vitor Sessak wrote:
>> $Subj.
>>
>> -Vitor
> 
>> Index: libswscale/swscale.c
>> ===================================================================
>> --- libswscale/swscale.c	(revision 27818)
>> +++ libswscale/swscale.c	(working copy)
>> @@ -1741,7 +1741,7 @@
>>  
>>  
>>      for (i=0; i<srcSliceH; i++) {
>> -        conv(srcPtr, dstPtr, c->srcW, c->pal_rgb);
>> +        conv(srcPtr, dstPtr, c->srcW, (uint8_t *) c->pal_rgb);
>>          srcPtr+= srcStride[0];
>>          dstPtr+= dstStride[0];
>>      }
> 
> ok

Applied this part.

>> @@ -2717,27 +2717,34 @@
>>      if (usePal(c->srcFormat)){
>>          for (i=0; i<256; i++){
>>              int p, r, g, b,y,u,v;
>> -            if(c->srcFormat == PIX_FMT_PAL8){
>> +            switch(c->srcFormat) {
>> +            case PIX_FMT_PAL8:
> 
> this does not look like a warning fix

No, but I find that using a switch() the warning fix is more readable. 
Attached is the straightforward version.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sws_warns2.diff
Type: text/x-diff
Size: 534 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081026/d899ac4b/attachment.diff>



More information about the ffmpeg-devel mailing list