From: Laurent Aimar Date: Mon, 19 Jul 2010 20:15:56 +0000 (+0200) Subject: Fixed a potential IDirectDrawSurface2 leak. X-Git-Tag: 1.2.0-pre1~5744 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f2366bdd03c2818e23fee33fefff9f4ca27892e1;p=vlc Fixed a potential IDirectDrawSurface2 leak. --- diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c index 75661e6f05..ff1d19ba70 100644 --- a/modules/video_output/msw/directx.c +++ b/modules/video_output/msw/directx.c @@ -1217,6 +1217,8 @@ static void DirectXDestroyPictureResource(vout_display_t *vd) { vout_display_sys_t *sys = vd->sys; + if (sys->resource.p_sys->front_surface != sys->resource.p_sys->surface) + DirectXDestroySurface(sys->resource.p_sys->surface); DirectXDestroySurface(sys->resource.p_sys->front_surface); if (sys->resource.p_sys->fallback) picture_Release(sys->resource.p_sys->fallback);