[vlc-commits] Direct3D9: destroy video hwnd to prevent handle leak

Hannes Domani git at videolan.org
Sun Feb 8 16:18:25 CET 2015


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Sun Feb  8 14:08:50 2015 +0100| [580970d3ae3ec2b0c08f0215056a69a7f7a5e747] | committer: Jean-Baptiste Kempf

Direct3D9: destroy video hwnd to prevent handle leak

IDirect3DDevice9_Present() creates an event like this:
\Sessions\1\BaseNamedObjects\DwmDxBltEvent_a7045e

But it isn't closed with IDirect3DDevice9_Release(), only explicitely
destroying the video window closes the event handle.

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

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

 modules/video_output/msw/events.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index 73eb5c0..866b279 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -865,6 +865,9 @@ static void Win32VoutCloseWindow( event_thread_t *p_event )
     vout_display_t *vd = p_event->vd;
     msg_Dbg( vd, "Win32VoutCloseWindow" );
 
+    #ifdef MODULE_NAME_IS_direct3d9
+    DestroyWindow( p_event->hvideownd );
+    #endif
     DestroyWindow( p_event->hwnd );
     if( p_event->hfswnd )
         DestroyWindow( p_event->hfswnd );



More information about the vlc-commits mailing list