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

git at videolan.org git at videolan.org
Mon Jul 19 23:24:37 CEST 2010


vlc/vlc-1.1 | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jul 19 22:15:56 2010 +0200| [2f9f4358fc941e65438a50f51016a42aa8359e80] | committer: Jean-Baptiste Kempf 

Fixed a potential IDirectDrawSurface2 leak.
(cherry picked from commit f2366bdd03c2818e23fee33fefff9f4ca27892e1)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 e7c1cae..76a6065 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -1212,6 +1212,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);
 }
 



More information about the vlc-commits mailing list