소스 검색

video: fix surface leak when duplicating mjpeg

(cherry picked from commit eb918af3dc9ca15071045cd2111b25fcbbe899a0)
Green Sky 5 달 전
부모
커밋
7939309520
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);