Fix freeze on shutdown

Recording / streaming start event might be stuck in event queue if
advanced scene switcher or OBS takes a while to shut down.
This could result in the plugin starting back up while OBS is attempting
to shut down resulting in a potential deadlock during shutdown.
This commit is contained in:
WarmUpTill 2025-09-23 17:55:33 +02:00 committed by WarmUpTill
parent de32e1b18e
commit dd5bcf425a

View File

@ -552,18 +552,28 @@ static void resetLiveTime()
static void checkAutoStartRecording()
{
if (switcher->obsIsShuttingDown) {
return;
}
if (switcher->autoStartEvent == SwitcherData::AutoStart::RECORDING ||
switcher->autoStartEvent ==
SwitcherData::AutoStart::RECORINDG_OR_STREAMING)
SwitcherData::AutoStart::RECORINDG_OR_STREAMING) {
switcher->Start();
}
}
static void checkAutoStartStreaming()
{
if (switcher->obsIsShuttingDown) {
return;
}
if (switcher->autoStartEvent == SwitcherData::AutoStart::STREAMING ||
switcher->autoStartEvent ==
SwitcherData::AutoStart::RECORINDG_OR_STREAMING)
SwitcherData::AutoStart::RECORINDG_OR_STREAMING) {
switcher->Start();
}
}
static void handleTransitionEnd()