Browse code

use correct type for palette

Originally committed as revision 9554 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2007/07/09 09:08:47
Showing 1 changed files
... ...
@@ -155,7 +155,7 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
155 155
     int tag, type, count, off, value = 0;
156 156
     uint8_t *src, *dst;
157 157
     int i, j, ssize, soff, stride;
158
-    int *pal;
158
+    uint32_t *pal;
159 159
     uint8_t *rp, *gp, *bp;
160 160
 
161 161
     tag = tget_short(&buf, s->le);
... ...
@@ -245,7 +245,7 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
245 245
         }
246 246
         if(s->bpp == 8){
247 247
             /* make default grayscale pal */
248
-            pal = (int *) s->picture.data[1];
248
+            pal = (uint32_t *) s->picture.data[1];
249 249
             for(i = 0; i < 256; i++)
250 250
                 pal[i] = i * 0x010101;
251 251
         }
... ...
@@ -378,7 +378,7 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
378 378
             av_log(s->avctx, AV_LOG_ERROR, "Palette met but this is not palettized format\n");
379 379
             return -1;
380 380
         }
381
-        pal = (int *) s->picture.data[1];
381
+        pal = (uint32_t *) s->picture.data[1];
382 382
         off = type_sizes[type];
383 383
         rp = buf;
384 384
         gp = buf + count / 3 * off;