Mercurial > mplayer.hg
changeset 33318:a06e98375ec9
Fix strict-aliasing violation warnings.
author | reimar |
---|---|
date | Sat, 07 May 2011 19:17:04 +0000 |
parents | 73ba433d4d28 |
children | efc3594f1f07 |
files | libvo/vo_sdl.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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