# HG changeset patch # User arpi # Date 1034890355 0 # Node ID 4f6bbaf09dbc7d7e6dfd99bf993f134aae57dac0 # Parent 2263b7200fddbc8db167f55dca4e447abe94c81d fixing palette export diff -r 2263b7200fdd -r 4f6bbaf09dbc libmpcodecs/vd_raw.c --- a/libmpcodecs/vd_raw.c Thu Oct 17 20:37:55 2002 +0000 +++ b/libmpcodecs/vd_raw.c Thu Oct 17 21:32:35 2002 +0000 @@ -88,7 +88,14 @@ if(sh->format==0 || sh->format==3) mpi->stride[0]=(mpi->stride[0]+3)&(~3); if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){ // export palette: - mpi->planes[1]=sh->bih ? (((unsigned char*)&sh->bih)+40) : NULL; + mpi->planes[1]=sh->bih ? (unsigned char*)(sh->bih+1) : NULL; +#if 0 + printf("Exporting palette: %p !!\n",mpi->planes[1]); + { unsigned char* p=mpi->planes[1]; + int i; + for(i=0;i<64;i++) printf("%3d: %02X %02X %02X (%02X)\n",i,p[4*i],p[4*i+1],p[4*i+2],p[4*i+3]); + } +#endif } frame_size=mpi->stride[0]*mpi->h; if(mpi->bpp<8) frame_size=frame_size*mpi->bpp/8;