Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/systemclock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/quartz/tests/systemclock.c b/dlls/quartz/tests/systemclock.c index cd291e1490..3c493a0f38 100644 --- a/dlls/quartz/tests/systemclock.c +++ b/dlls/quartz/tests/systemclock.c @@ -89,8 +89,8 @@ static void test_get_time(void) Sleep(100); hr = IReferenceClock_GetTime(clock, &time2); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(time2 - time1 > 98 * 10000, "Expected about %s, but got %s.\n", - wine_dbgstr_longlong(time1 + 98 * 10000), wine_dbgstr_longlong(time2)); + ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n", + wine_dbgstr_longlong(time1 + 80 * 10000), wine_dbgstr_longlong(time2));
ref = IReferenceClock_Release(clock); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -160,11 +160,11 @@ static void test_advise(void)
hr = IReferenceClock_AdvisePeriodic(clock, current, 500 * 10000, (HSEMAPHORE)semaphore, &cookie); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!WaitForSingleObject(semaphore, 10), "Semaphore should be signaled.\n"); + ok(!WaitForSingleObject(semaphore, 20), "Semaphore should be signaled.\n"); for (i = 0; i < 5; ++i) { - ok(WaitForSingleObject(semaphore, 480) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n"); - ok(!WaitForSingleObject(semaphore, 40), "Semaphore should be signaled.\n"); + ok(WaitForSingleObject(semaphore, 460) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n"); + ok(!WaitForSingleObject(semaphore, 60), "Semaphore should be signaled.\n"); }
hr = IReferenceClock_Unadvise(clock, cookie);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/tests/videocapture.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 062138e885..5532654650 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -117,7 +117,6 @@ START_TEST(videocapture) if (hr == S_OK) { test_capture(filter); - IBaseFilter_Release(filter); ref = IBaseFilter_Release(filter); ok(!ref, "Got outstanding refcount %d.\n", ref); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 87365d9212..db5ee0fbf4 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -82,21 +82,6 @@ static inline VideoRendererImpl *impl_from_BaseControlVideo(BaseControlVideo *if return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlVideo); }
-static BOOL CreateRenderingSubsystem(VideoRendererImpl* This) -{ - This->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - if (!This->hEvent) - return FALSE; - - if (FAILED(BaseWindowImpl_PrepareWindow(&This->baseControlWindow.baseWindow))) - { - CloseHandle(This->hEvent); - return FALSE; - } - - return TRUE; -} - static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This) { if (!This->init && (!This->WindowPos.right || !This->WindowPos.top)) @@ -873,8 +858,11 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out) if (FAILED(hr)) goto fail;
- if (!CreateRenderingSubsystem(pVideoRenderer)) { - hr = E_FAIL; + pVideoRenderer->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + + if (FAILED(hr = BaseWindowImpl_PrepareWindow(&pVideoRenderer->baseControlWindow.baseWindow))) + { + CloseHandle(pVideoRenderer->hEvent); goto fail; }
We don't use a lock, and while it's true we probably should be, we already have access to one.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 6 +++--- dlls/quartz/vmr9.c | 5 ++--- dlls/strmbase/window.c | 5 ++--- include/wine/strmbase.h | 5 ++--- 4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index db5ee0fbf4..a11c2047a6 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -846,9 +846,9 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out) if (FAILED(hr)) goto fail;
- hr = BaseControlWindow_Init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, - &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter, - &pVideoRenderer->renderer.sink.pin, &renderer_BaseWindowFuncTable); + hr = strmbase_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, + &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, + &renderer_BaseWindowFuncTable); if (FAILED(hr)) goto fail;
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 59a5152cf5..c3b948f599 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2251,9 +2251,8 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid) if (FAILED(hr)) goto fail;
- hr = BaseControlWindow_Init(&pVMR->baseControlWindow, &IVideoWindow_VTable, - &pVMR->renderer.filter, &pVMR->renderer.filter.csFilter, - &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); + hr = strmbase_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, + &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); if (FAILED(hr)) goto fail;
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 23f37de52b..be6646c27a 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -144,9 +144,9 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) return S_OK; }
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, +HRESULT WINAPI strmbase_window_init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, - CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) + struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable) { HRESULT hr;
@@ -158,7 +158,6 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, pControlWindow->hwndDrain = NULL; pControlWindow->hwndOwner = NULL; pControlWindow->pFilter = owner; - pControlWindow->pInterfaceLock = lock; pControlWindow->pPin = pPin; } return hr; diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 5be7caa371..74c8f4721b 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -403,12 +403,11 @@ typedef struct tagBaseControlWindow HWND hwndDrain; HWND hwndOwner; struct strmbase_filter *pFilter; - CRITICAL_SECTION* pInterfaceLock; struct strmbase_pin *pPin; } BaseControlWindow;
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, - struct strmbase_filter *filter, CRITICAL_SECTION *lock, struct strmbase_pin *pin, const BaseWindowFuncTable *ops); +HRESULT WINAPI strmbase_window_init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, + struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table); HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);