# HG changeset patch # User reimar # Date 1304795824 0 # Node ID a06e98375ec9d40afa5f75f33de6d7af322ee63a # Parent 73ba433d4d28148878b31e2ad5918ba084c3e1e1 Fix strict-aliasing violation warnings. diff -r 73ba433d4d28 -r a06e98375ec9 libvo/vo_sdl.c --- a/libvo/vo_sdl.c Sat May 07 19:09:13 2011 +0000 +++ b/libvo/vo_sdl.c Sat May 07 19:17:04 2011 +0000 @@ -1187,12 +1187,12 @@ case IMGFMT_YVYU: { /* yuy2 and yvyu represent black the same way */ - uint8_t yuy2_black[] = {0, 128, 0, 128}; + uint32_t yuy2_black = HAVE_BIGENDIAN ? 0x00800080 : 0x80008000; SDL_OVR_LOCK((void) 0) erase_area_4(x*2, w*2, h, priv->overlay->pitches[0], - *((uint32_t*) yuy2_black), + yuy2_black, priv->overlay->pixels[0] + priv->overlay->pitches[0]*y); SDL_OVR_UNLOCK @@ -1201,12 +1201,12 @@ case IMGFMT_UYVY: { - uint8_t uyvy_black[] = {128, 0, 128, 0}; + uint32_t uyvy_black = HAVE_BIGENDIAN ? 0x80008000 : 0x00800080; SDL_OVR_LOCK((void) 0) erase_area_4(x*2, w*2, h, priv->overlay->pitches[0], - *((uint32_t*) uyvy_black), + uyvy_black, priv->overlay->pixels[0] + priv->overlay->pitches[0]*y); SDL_OVR_UNLOCK