]> git.sesse.net Git - vlc/commitdiff
Direct3D9: destroy video hwnd to prevent handle leak
authorHannes Domani <ssbssa@yahoo.de>
Sun, 8 Feb 2015 13:08:50 +0000 (14:08 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 8 Feb 2015 15:03:09 +0000 (16:03 +0100)
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@videolan.org>
modules/video_output/msw/events.c

index 73eb5c0369c6b28db20d535737dbfefedd585513..866b27940f7fc3d979a344b8ad4cf77bf815878a 100644 (file)
@@ -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 );