]> git.sesse.net Git - vlc/commitdiff
Fixed a potential IDirectDrawSurface2 leak.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 19 Jul 2010 20:15:56 +0000 (22:15 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 19 Jul 2010 21:14:54 +0000 (23:14 +0200)
modules/video_output/msw/directx.c

index 75661e6f055cd123c9c12eceb4441582af48e915..ff1d19ba703ba55da0e76ceece18fe8b9b22c310 100644 (file)
@@ -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);