]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tiff.c
cleanup get_unary()
[ffmpeg] / libavcodec / tiff.c
index f614b32a6ac0f50ca353be8e907f9d738906e89c..6c1c346e61d7c728412194ddbc062123e2f4c830 100644 (file)
@@ -17,7 +17,6 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /**
@@ -156,7 +155,8 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
     int tag, type, count, off, value = 0;
     uint8_t *src, *dst;
     int i, j, ssize, soff, stride;
-    int *pal, *rp, *gp, *bp;
+    uint32_t *pal;
+    uint8_t *rp, *gp, *bp;
 
     tag = tget_short(&buf, s->le);
     type = tget_short(&buf, s->le);
@@ -245,7 +245,7 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
         }
         if(s->bpp == 8){
             /* make default grayscale pal */
-            pal = s->picture.data[1];
+            pal = (uint32_t *) s->picture.data[1];
             for(i = 0; i < 256; i++)
                 pal[i] = i * 0x010101;
         }
@@ -378,7 +378,7 @@ static int tiff_decode_tag(TiffContext *s, uint8_t *start, uint8_t *buf, uint8_t
             av_log(s->avctx, AV_LOG_ERROR, "Palette met but this is not palettized format\n");
             return -1;
         }
-        pal = s->picture.data[1];
+        pal = (uint32_t *) s->picture.data[1];
         off = type_sizes[type];
         rp = buf;
         gp = buf + count / 3 * off;