diff src/render/SDL_yuv_sw.c @ 5281:15a71bec4a55

merged
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 12 Feb 2011 19:16:09 -0800
parents 11bd1585efb5
children
line wrap: on
line diff
--- a/src/render/SDL_yuv_sw.c	Sun Feb 06 23:48:31 2011 -0800
+++ b/src/render/SDL_yuv_sw.c	Sat Feb 12 19:16:09 2011 -0800
@@ -1,6 +1,6 @@
 /*
     SDL - Simple DirectMedia Layer
-    Copyright (C) 1997-2010 Sam Lantinga
+    Copyright (C) 1997-2011 Sam Lantinga
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -1127,7 +1127,8 @@
                 ("YV12 and IYUV textures only support full surface updates");
             return -1;
         }
-        SDL_memcpy(swdata->pixels, pixels, swdata->h * swdata->w * 2);
+        SDL_memcpy(swdata->pixels, pixels,
+                   (swdata->h * swdata->w) + (swdata->h * swdata->w) / 2);
         break;
     case SDL_PIXELFORMAT_YUY2:
     case SDL_PIXELFORMAT_UYVY: