comparison src/video/x11/SDL_x11render.c @ 2882:04e89201f6ed

Fixed crash when resizing YUV textures
author Sam Lantinga <slouken@libsdl.org>
date Sat, 20 Dec 2008 06:46:37 +0000
parents 36e312e0fac0
children 9dde605c7540
comparison
equal deleted inserted replaced
2881:c8d203ef4335 2882:04e89201f6ed
641 return -1; 641 return -1;
642 } 642 }
643 } 643 }
644 644
645 /* Set up fake surfaces for SDL_SoftStretch() */ 645 /* Set up fake surfaces for SDL_SoftStretch() */
646 SDL_zero(src);
646 src.format = &fmt; 647 src.format = &fmt;
647 src.w = texture->w; 648 src.w = texture->w;
648 src.h = texture->h; 649 src.h = texture->h;
649 #ifndef NO_SHARED_MEMORY 650 #ifndef NO_SHARED_MEMORY
650 if (texturedata->shminfo.shmaddr) { 651 if (texturedata->shminfo.shmaddr) {
652 } else 653 } else
653 #endif 654 #endif
654 src.pixels = texturedata->pixels; 655 src.pixels = texturedata->pixels;
655 src.pitch = texturedata->pitch; 656 src.pitch = texturedata->pitch;
656 657
658 SDL_zero(dst);
657 dst.format = &fmt; 659 dst.format = &fmt;
658 dst.w = image->width; 660 dst.w = image->width;
659 dst.h = image->height; 661 dst.h = image->height;
660 dst.pixels = image->data; 662 dst.pixels = image->data;
661 dst.pitch = image->bytes_per_line; 663 dst.pitch = image->bytes_per_line;