Explorar o código

video: fix surface leak when duplicating mjpeg

(cherry picked from commit eb918af3dc9ca15071045cd2111b25fcbbe899a0)
Green Sky hai 5 meses
pai
achega
7939309520
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/video/SDL_surface.c

+ 1 - 0
src/video/SDL_surface.c

@@ -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);