[FFmpeg-cvslog] r9550 - trunk/libavcodec/tiff.c

Måns Rullgård mans
Mon Jul 9 01:45:06 CEST 2007


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Mon, Jul 09, 2007 at 01:15:05AM +0200, mru wrote:
>> Author: mru
>> Date: Mon Jul  9 01:15:04 2007
>> New Revision: 9550
>> 
>> Log:
>> kill warnings
> [...]
>> @@ -244,7 +245,7 @@ static int tiff_decode_tag(TiffContext *
>>          }
>>          if(s->bpp == 8){
>>              /* make default grayscale pal */
>> -            pal = s->picture.data[1];
>> +            pal = (int *) s->picture.data[1];
>>              for(i = 0; i < 256; i++)
>>                  pal[i] = i * 0x010101;
>>          }
>> @@ -377,7 +378,7 @@ static int tiff_decode_tag(TiffContext *
>>              av_log(s->avctx, AV_LOG_ERROR, "Palette met but this is not palettized format\n");
>>              return -1;
>>          }
>> -        pal = s->picture.data[1];
>> +        pal = (int *) s->picture.data[1];
>>          off = type_sizes[type];
>
> this hides the warning but doesnt fix the wrong code, that is data[1] is
> not int but uint32_t

data[1] is uint8_t*.  That said, that int should probably be uint32_t.
Either way, the buffer should have proper alignment.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list