From cd526791606fddfd06c5dd24ad3b080913285fc8 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 20 May 2017 12:30:42 -0700 Subject: [PATCH] UI: Unlock mutex before trying to stop output Prevents the output from hard-locking on itself when the stop call would trigger the callback and then try to lock again. Probably could be solved with a recursive mutex, but at that point it's not really necessary. --- UI/window-basic-auto-config-test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp index f18c8656b..f7b1ffe08 100644 --- a/UI/window-basic-auto-config-test.cpp +++ b/UI/window-basic-auto-config-test.cpp @@ -338,12 +338,14 @@ void AutoConfigTestPage::TestBandwidthThread() unique_lock ul(m); if (cancel) { + ul.unlock(); obs_output_force_stop(output); return; } if (!stopped && !connected) cv.wait(ul); if (cancel) { + ul.unlock(); obs_output_force_stop(output); return; } @@ -360,6 +362,7 @@ void AutoConfigTestPage::TestBandwidthThread() if (stopped) continue; if (cancel) { + ul.unlock(); obs_output_force_stop(output); return; }