restore needed cast to correct type with const
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 1 Jun 2008 19:08:16 +0000 (19:08 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 1 Jun 2008 19:08:16 +0000 (19:08 +0000)
Originally committed as revision 26957 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/rgb2rgb_template.c

index bdd0ab98838b520f10250e10f1a074ea923381e1..3fb04c9c91cede68a379a38f0eb9fc16eb9868a6 100644 (file)
@@ -325,14 +325,14 @@ static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_
     mm_end = end - 3;
     while (s < mm_end)
     {
-        register uint32_t x= *s;
+        register uint32_t x= *((const uint32_t*)s);
         *((uint32_t *)d) = ((x>>1)&0x7FE07FE0) | (x&0x001F001F);
         s+=4;
         d+=4;
     }
     if (s < end)
     {
-        register uint16_t x= *s;
+        register uint16_t x= *((const uint16_t*)s);
         *((uint16_t *)d) = ((x>>1)&0x7FE0) | (x&0x001F);
         s+=2;
         d+=2;