[MPlayer-dev-eng] [PATCH] vd_sgi bugfix on AMD64

Rich Felker dalias at aerifal.cx
Fri Jun 30 00:11:02 CEST 2006


On Thu, Jun 29, 2006 at 05:44:36PM -0400, Reynaldo H. Verdejo Pinochet wrote:
> On Thu, Jun 29, 2006 at 11:13:12PM +0200, Reimar Döffinger wrote:
> > Hi,
> > On Thu, Jun 29, 2006 at 08:25:15PM +0200, Paul-Francois Fontigny wrote:
> > > SGI compressed images don't show up correctly on AMD64.
> > > The attached patch solve it.
> > 
> > No objections to this patch, but...
> > 
> > > -  unsigned long *starttab;
> > > +  uint32_t *starttab;
> > [...]
> > > -  starttab = (long*)(data + SGI_HEADER_LEN); 
> > > +  starttab = (uint32_t*)(data + SGI_HEADER_LEN); 
> > [...]
> > > -      start_offset = be2me_32(*(unsigned long*) &starttab[y + z * ysize]);
> > > +      start_offset = be2me_32(*(uint32_t*) &starttab[y + z * ysize]);
> > 
> > Did someone take a course in "how many useless typecast fit in one C
> > program" or do I miss something??
> 
> yeah, maybe he thinked it would be considered a cosmethic change :)

at least these casts have some meaning, unlike the idiots casting the
result of malloc...

rich




More information about the MPlayer-dev-eng mailing list