src/render/SDL_yuv_sw.c
changeset 5269 11bd1585efb5
parent 5262 b530ef003506
child 5535 96594ac5fd1a
     1.1 --- a/src/render/SDL_yuv_sw.c	Sat Feb 12 08:17:58 2011 -0800
     1.2 +++ b/src/render/SDL_yuv_sw.c	Sat Feb 12 10:13:53 2011 -0800
     1.3 @@ -1127,7 +1127,8 @@
     1.4                  ("YV12 and IYUV textures only support full surface updates");
     1.5              return -1;
     1.6          }
     1.7 -        SDL_memcpy(swdata->pixels, pixels, swdata->h * swdata->w * 2);
     1.8 +        SDL_memcpy(swdata->pixels, pixels,
     1.9 +                   (swdata->h * swdata->w) + (swdata->h * swdata->w) / 2);
    1.10          break;
    1.11      case SDL_PIXELFORMAT_YUY2:
    1.12      case SDL_PIXELFORMAT_UYVY: