diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index f93f355b606..b6e9f3ab0f1 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4095,7 +4095,7 @@ static void test_window_threading(void) if ((hwnd = get_renderer_hwnd(graph))) { tid = GetWindowThreadProcessId(hwnd, NULL); - todo_wine ok(tid == GetCurrentThreadId(), "Window should be created on main thread.\n"); + ok(tid == GetCurrentThreadId(), "Window should be created on main thread.\n"); } else skip("Could not find renderer window.\n"); diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 429b59bfe33..87ff9f59bf3 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -45,11 +45,8 @@ typedef struct VideoRendererImpl IOverlay IOverlay_iface; BOOL init; - HANDLE hThread; - DWORD ThreadID; HANDLE hEvent; - BOOL ThreadResult; RECT SourceRect; RECT DestRect; RECT WindowPos; @@ -83,57 +80,18 @@ static inline VideoRendererImpl *impl_from_BaseControlVideo(BaseControlVideo *if return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlVideo); } -static DWORD WINAPI MessageLoop(LPVOID lpParameter) -{ - VideoRendererImpl* This = lpParameter; - MSG msg; - BOOL fGotMessage; - - TRACE("Starting message loop\n"); - - if (FAILED(BaseWindowImpl_PrepareWindow(&This->baseControlWindow.baseWindow))) - { - This->ThreadResult = FALSE; - SetEvent(This->hEvent); - return 0; - } - - This->ThreadResult = TRUE; - SetEvent(This->hEvent); - - while ((fGotMessage = GetMessageW(&msg, NULL, 0, 0)) != 0 && fGotMessage != -1) - { - TranslateMessage(&msg); - DispatchMessageW(&msg); - } - - TRACE("End of message loop\n"); - - return msg.wParam; -} - static BOOL CreateRenderingSubsystem(VideoRendererImpl* This) { This->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); if (!This->hEvent) return FALSE; - This->hThread = CreateThread(NULL, 0, MessageLoop, This, 0, &This->ThreadID); - if (!This->hThread) + if (FAILED(BaseWindowImpl_PrepareWindow(&This->baseControlWindow.baseWindow))) { CloseHandle(This->hEvent); return FALSE; } - WaitForSingleObject(This->hEvent, INFINITE); - - if (!This->ThreadResult) - { - CloseHandle(This->hEvent); - CloseHandle(This->hThread); - return FALSE; - } - return TRUE; } @@ -379,9 +337,6 @@ static void video_renderer_destroy(BaseRenderer *iface) BaseControlWindow_Destroy(&filter->baseControlWindow); BaseControlVideo_Destroy(&filter->baseControlVideo); - PostThreadMessageW(filter->ThreadID, WM_QUIT, 0, 0); - WaitForSingleObject(filter->hThread, INFINITE); - CloseHandle(filter->hThread); CloseHandle(filter->hEvent); strmbase_renderer_cleanup(&filter->renderer);