evr: Free type libraries on process detach (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b6c96cf763
commit
1752958240
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "evr_private.h"
|
#include "evr_private.h"
|
||||||
#include "d3d9.h"
|
#include "d3d9.h"
|
||||||
#include "wine/strmbase.h"
|
|
||||||
|
|
||||||
#include "initguid.h"
|
#include "initguid.h"
|
||||||
#include "dxva2api.h"
|
#include "dxva2api.h"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "dshow.h"
|
#include "dshow.h"
|
||||||
#include "evr.h"
|
#include "evr.h"
|
||||||
|
#include "wine/strmbase.h"
|
||||||
|
|
||||||
HRESULT evr_filter_create(IUnknown *outer_unk, void **ppv) DECLSPEC_HIDDEN;
|
HRESULT evr_filter_create(IUnknown *outer_unk, void **ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -36,18 +36,17 @@ static HINSTANCE instance_evr;
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||||
{
|
{
|
||||||
TRACE("(%p, %d, %p)\n", instance, reason, reserved);
|
if (reason == DLL_WINE_PREATTACH)
|
||||||
|
return FALSE; /* prefer native version */
|
||||||
switch (reason)
|
else if (reason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
case DLL_WINE_PREATTACH:
|
instance_evr = instance;
|
||||||
return FALSE; /* prefer native version */
|
DisableThreadLibraryCalls(instance);
|
||||||
case DLL_PROCESS_ATTACH:
|
}
|
||||||
instance_evr = instance;
|
else if (reason == DLL_PROCESS_DETACH && !reserved)
|
||||||
DisableThreadLibraryCalls(instance);
|
{
|
||||||
break;
|
strmbase_release_typelibs();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue