mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-19 03:35:04 -04:00
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.
This commit is contained in:
@@ -338,12 +338,14 @@ void AutoConfigTestPage::TestBandwidthThread()
|
||||
|
||||
unique_lock<mutex> 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user