[Mplayer-cvslog] CVS: main/libvo vo_directx.c,1.4,1.5

Sascha Sommer CVS faust3 at mplayerhq.hu
Thu Oct 17 15:18:14 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv31087/libvo

Modified Files:
	vo_directx.c 
Log Message:
10l - noticed by Soeren Mueller <soeren.mueller at webwasher.com>

Index: vo_directx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directx.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vo_directx.c	11 Oct 2002 14:48:07 -0000	1.4
+++ vo_directx.c	17 Oct 2002 13:17:56 -0000	1.5
@@ -45,6 +45,7 @@
 static LPDIRECTDRAWSURFACE  g_lpddsBack = NULL;     //Back surface
 static LPDIRECTDRAWCLIPPER  g_lpddclipper;          //clipper object, can only be used without overlay
 static DDSURFACEDESC		ddsdsf;                 //surface descripiton needed for locking
+static HINSTANCE            hddraw_dll;             //handle to ddraw.dll
 static RECT                 rd;                     //rect of our stretched image
 static RECT                 rs;                     //rect of our source image
 static HWND                 hWnd=NULL;              //handle to the window
@@ -330,12 +331,14 @@
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>window destroyed\n");
 	if (g_lpdd != NULL) g_lpdd->lpVtbl->Release(g_lpdd);
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>directdrawobject released\n");
+	FreeLibrary( hddraw_dll);
+	hddraw_dll= NULL;
+	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>ddraw.dll freed\n");
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>uninited\n");    
 }
 
 static uint32_t Directx_InitDirectDraw()
 {
-    HINSTANCE  hddraw_dll;
 	HRESULT    (WINAPI *OurDirectDrawCreate)(GUID *,LPDIRECTDRAW *,IUnknown *);
  	LPDIRECTDRAW lpDDraw;
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>Initing DirectDraw\n" );
@@ -372,9 +375,7 @@
     }
 	//release our old interface and free ddraw.dll
     lpDDraw->lpVtbl->Release(lpDDraw);
- 	FreeLibrary( hddraw_dll);
-	hddraw_dll= NULL;
-	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>lpDDraw released & hddraw freed\n" );
+	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>lpDDraw released\n" );
 	//set cooperativelevel: for our tests, no handle to a window is needed
 	if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, NULL, DDSCL_NORMAL) != DD_OK)
     {




More information about the MPlayer-cvslog mailing list