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