[PATCH v2 0/1] MR7122: quartz/dsoundrender: Restart the render thread when clearing EOS in dsound_render_sink_end_flush().
This fixes the hang mentioned in https://bugs.winehq.org/show_bug.cgi?id=57632 introduced by e6b8e9ee20937f12dbf19145a9f2ca1ca3364da3. That bug also mentions the radio being silent, that's unrelated to the hang should probably be a separate bug. -- v2: quartz/dsoundrender: Restart the render thread when clearing EOS in dsound_render_sink_end_flush(). https://gitlab.winehq.org/wine/wine/-/merge_requests/7122
From: Connor McAdams <cmcadams(a)codeweavers.com> This avoids a hang where samples are queued after the thread is exited due to receiving EOS, but the thread is no longer processing samples. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57632 Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/quartz/dsoundrender.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 46782022963..59609a3c849 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -544,8 +544,19 @@ static HRESULT dsound_render_sink_end_flush(struct strmbase_sink *iface) struct dsound_render *filter = impl_from_strmbase_pin(&iface->pin); EnterCriticalSection(&filter->filter.stream_cs); + if (filter->eos && filter->filter.state != State_Stopped) + { + WaitForSingleObject(filter->render_thread, INFINITE); + CloseHandle(filter->render_thread); + + if (!(filter->render_thread = CreateThread(NULL, 0, render_thread_run, filter, 0, NULL))) + { + LeaveCriticalSection(&filter->filter.stream_cs); + return HRESULT_FROM_WIN32(GetLastError()); + } + filter->eos = FALSE; + } - filter->eos = FALSE; ResetEvent(filter->flush_event); if (filter->dsbuffer) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7122
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150819 Your paranoid android. === debian11b (64 bit WoW report) === dnsapi: query.c:142: Test failed: expected record name L"testbot.winehq.org", got L"becky.ns.cloudflare.com" kernel32: comm.c:1574: Test failed: AbortWaitCts hComPortEvent failed comm.c:1586: Test failed: Unexpected time 1001, expected around 500 secur32: schannel.c:1206: Test failed: QueryContextAttributesW(SECPKG_ATTR_ENDPOINT_BINDINGS) failed: 00000057 schannel.c:1284: Test failed: got L"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" schannel.c:1298: Test failed: got L"ECDSA" schannel.c:1307: Test failed: key_info.SignatureAlgorithm = 2203 schannel.c:1309: Test failed: key_info.sSignatureAlgorithmName = ECDSA wininet: http.c:6917: Test failed: lpszSubjectInfo = test.winehq.org
On Thu Jan 9 17:41:15 2025 +0000, Elizabeth Figura wrote:
You can delete the read_thread_shutdown assignment; it can't be shut down if the state isn't stopped. Done.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7122#note_91723
This merge request was approved by Elizabeth Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7122
participants (4)
-
Connor McAdams -
Connor McAdams (@cmcadams) -
Elizabeth Figura (@zfigura) -
Marvin