Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/acmwrapper.c | 2 -- dlls/quartz/avidec.c | 2 -- dlls/quartz/dsoundrender.c | 2 -- dlls/quartz/filesource.c | 2 -- dlls/quartz/filtergraph.c | 2 -- dlls/quartz/filtermapper.c | 2 -- dlls/quartz/main.c | 24 ++---------------------- dlls/quartz/memallocator.c | 2 -- dlls/quartz/passthrough.c | 2 -- dlls/quartz/quartz_private.h | 2 -- dlls/quartz/systemclock.c | 2 -- dlls/quartz/videorenderer.c | 2 -- dlls/quartz/vmr9.c | 10 ++-------- 13 files changed, 4 insertions(+), 52 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 81e856a00df..a07bdfef0ca 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -484,8 +484,6 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface) FreeMediaType(&filter->mt); strmbase_filter_cleanup(&filter->filter); free(filter); - - InterlockedDecrement(&object_locks); }
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index b1e07fe5879..3d947e1b1bf 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -538,8 +538,6 @@ static void avi_decompressor_destroy(struct strmbase_filter *iface)
strmbase_filter_cleanup(&filter->filter); free(filter); - - InterlockedDecrement(&object_locks); }
static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 68c88ea5a15..9ecdb280cc6 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -549,8 +549,6 @@ static void dsound_render_destroy(struct strmbase_filter *iface) strmbase_passthrough_cleanup(&filter->passthrough); strmbase_filter_cleanup(&filter->filter); free(filter); - - InterlockedDecrement(&object_locks); }
static struct strmbase_pin *dsound_render_get_pin(struct strmbase_filter *iface, unsigned int index) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index cf5fe457715..e5e7b482984 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -351,8 +351,6 @@ static void async_reader_destroy(struct strmbase_filter *iface)
strmbase_filter_cleanup(&filter->filter); free(filter); - - InterlockedDecrement(&object_locks); }
static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index a1f3757a202..47b9da9510b 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -475,8 +475,6 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown *iface) DeleteCriticalSection(&This->event_cs); DeleteCriticalSection(&This->cs); free(This); - - InterlockedDecrement(&object_locks); } return ref; } diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index b3210fdcd59..230273891d4 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -487,8 +487,6 @@ static ULONG WINAPI Inner_Release(IUnknown *iface) if (ref == 0) { CoTaskMemFree(This); - - InterlockedDecrement(&object_locks); }
return ref; diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 303cc30a931..ed7080b76b9 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -24,11 +24,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN; -extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN; extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
-LONG object_locks = 0; - BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) { if (reason == DLL_PROCESS_DETACH && !reserved) @@ -127,21 +124,15 @@ static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter
if (SUCCEEDED(hres = This->create_instance(pOuter, &punk))) { - InterlockedIncrement(&object_locks); hres = IUnknown_QueryInterface(punk, riid, ppobj); IUnknown_Release(punk); } return hres; }
-static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock) +static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL lock) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - FIXME("(%p)->(%d),stub!\n",This,dolock); - if(dolock) - InterlockedIncrement(&object_locks); - else - InterlockedDecrement(&object_locks); + FIXME("iface %p, lock %d, stub!\n", iface, lock); return S_OK; }
@@ -199,17 +190,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return QUARTZ_DllGetClassObject( rclsid, riid, ppv ); }
-/*********************************************************************** - * DllCanUnloadNow (QUARTZ.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - if (!object_locks && QUARTZ_DllCanUnloadNow() == S_OK) - return S_OK; - return S_FALSE; -} - - #define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } , #name },
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index cc13f776cfb..531fbe874cf 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -911,8 +911,6 @@ static void StdMemAllocator_Destroy(IMemAllocator *iface) DeleteCriticalSection(&This->csState);
CoTaskMemFree(This); - - InterlockedDecrement(&object_locks); }
HRESULT mem_allocator_create(IUnknown *lpUnkOuter, IUnknown **out) diff --git a/dlls/quartz/passthrough.c b/dlls/quartz/passthrough.c index 7f81ae8a1be..2f8fe9dc370 100644 --- a/dlls/quartz/passthrough.c +++ b/dlls/quartz/passthrough.c @@ -80,8 +80,6 @@ static ULONG WINAPI seeking_passthrough_Release(IUnknown *iface) { strmbase_passthrough_cleanup(&passthrough->passthrough); free(passthrough); - - InterlockedDecrement(&object_locks); } return refcount; } diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index de83c2535db..c706d906a26 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -58,8 +58,6 @@ static inline const char *debugstr_time(REFERENCE_TIME time) return wine_dbg_sprintf("%s", rev); }
-extern LONG object_locks; - /* see IAsyncReader::Request on MSDN for the explanation of this */ #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) #define BYTES_FROM_MEDIATIME(time) ((time) / 10000000) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 73a923a7b99..cebe4846f04 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -115,8 +115,6 @@ static ULONG WINAPI system_clock_inner_Release(IUnknown *iface) clock->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&clock->cs); heap_free(clock); - - InterlockedDecrement(&object_locks); } return refcount; } diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 1a59a9b5213..1dbb8a02181 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -130,8 +130,6 @@ static void video_renderer_destroy(struct strmbase_renderer *iface) video_window_cleanup(&filter->window); strmbase_renderer_cleanup(&filter->renderer); free(filter); - - InterlockedDecrement(&object_locks); }
static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 2562b74932a..4bde811c6d7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -528,12 +528,6 @@ static void vmr_disconnect(struct strmbase_renderer *This) } }
-static void vmr_free(struct quartz_vmr *filter) -{ - free(filter); - InterlockedDecrement(&object_locks); -} - static void vmr_destroy(struct strmbase_renderer *iface) { struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface); @@ -563,7 +557,7 @@ static void vmr_destroy(struct strmbase_renderer *iface) FreeLibrary(filter->hD3d9); strmbase_renderer_cleanup(&filter->renderer); if (!filter->IVMRSurfaceAllocatorNotify9_refcount) - vmr_free(filter); + free(filter); }
static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out) @@ -1955,7 +1949,7 @@ static ULONG WINAPI VMR9SurfaceAllocatorNotify_Release(IVMRSurfaceAllocatorNotif TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount && !filter->renderer.filter.refcount) - vmr_free(filter); + free(filter);
return refcount; }