[vlc-commits] commit: Fixed a potential IDirectDrawSurface2 leak. (Laurent Aimar )

git at videolan.org git at videolan.org
Mon Jul 19 23:15:39 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jul 19 22:15:56 2010 +0200| [f2366bdd03c2818e23fee33fefff9f4ca27892e1] | committer: Laurent Aimar 

Fixed a potential IDirectDrawSurface2 leak.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2366bdd03c2818e23fee33fefff9f4ca27892e1
---

 modules/video_output/msw/directx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 75661e6..ff1d19b 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);



More information about the vlc-commits mailing list