changeset 18856:8f3099900d8c

correct handling of sgi compressed images on amd64, patch by Paul-Francois Fontigny - pff AT filmik-be
author reynaldo
date Fri, 30 Jun 2006 03:18:12 +0000
parents a60bcf4969c3
children 0ba653cbc29f
files libmpcodecs/vd_sgi.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_sgi.c	Thu Jun 29 22:00:01 2006 +0000
+++ b/libmpcodecs/vd_sgi.c	Fri Jun 30 03:18:12 2006 +0000
@@ -155,7 +155,7 @@
 decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
 {
   unsigned char *rle_data, *dest_row;
-  unsigned long *starttab;
+  uint32_t *starttab;
   int y, z, xsize, ysize, zsize, chan_offset;
   long start_offset;
   
@@ -164,7 +164,7 @@
   zsize = info->zsize;
 
   /* rle offset table is right after the header */
-  starttab = (long*)(data + SGI_HEADER_LEN); 
+  starttab = (uint32_t*)(data + SGI_HEADER_LEN); 
   
    for (z = 0; z < zsize; z++) {
 
@@ -177,7 +177,7 @@
        dest_row = mpi->planes[0] + mpi->stride[0] * (ysize - 1 - y);
     
       /* set start of next run (offsets are from start of header) */
-      start_offset = be2me_32(*(unsigned long*) &starttab[y + z * ysize]);
+      start_offset = be2me_32(*(uint32_t*) &starttab[y + z * ysize]);
       
       rle_data = &data[start_offset];