mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-02 07:27:19 +08:00
video: fix surface leak when duplicating mjpeg
This commit is contained in:
@@ -1948,6 +1948,7 @@ SDL_Surface *SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelForm
|
|||||||
if (!convert->pixels) {
|
if (!convert->pixels) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
convert->flags &= ~SDL_SURFACE_PREALLOCATED;
|
||||||
convert->pitch = surface->pitch;
|
convert->pitch = surface->pitch;
|
||||||
SDL_memcpy(convert->pixels, surface->pixels, size);
|
SDL_memcpy(convert->pixels, surface->pixels, size);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user