src/render/SDL_yuv_sw.c
changeset 5269 11bd1585efb5
parent 5262 b530ef003506
child 5535 96594ac5fd1a
--- a/src/render/SDL_yuv_sw.c	Sat Feb 12 08:17:58 2011 -0800
+++ b/src/render/SDL_yuv_sw.c	Sat Feb 12 10:13:53 2011 -0800
@@ -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: