Commit 17529582 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

evr: Free type libraries on process detach (Valgrind).

parent b6c96cf7
......@@ -24,7 +24,6 @@
#include "evr_private.h"
#include "d3d9.h"
#include "wine/strmbase.h"
#include "initguid.h"
#include "dxva2api.h"
......
......@@ -21,6 +21,7 @@
#include "dshow.h"
#include "evr.h"
#include "wine/strmbase.h"
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)
{
TRACE("(%p, %d, %p)\n", instance, reason, reserved);
switch (reason)
if (reason == DLL_WINE_PREATTACH)
return FALSE; /* prefer native version */
else if (reason == DLL_PROCESS_ATTACH)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
instance_evr = instance;
DisableThreadLibraryCalls(instance);
break;
instance_evr = instance;
DisableThreadLibraryCalls(instance);
}
else if (reason == DLL_PROCESS_DETACH && !reserved)
{
strmbase_release_typelibs();
}
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment