This commit is contained in:
WarmUpTill 2020-11-14 17:11:21 +01:00
commit 2ae97cd90e
2 changed files with 3 additions and 6 deletions

View File

@ -330,7 +330,6 @@ void SwitcherData::Thread()
int sleep = 0;
while (true) {
startLoop:
std::unique_lock<std::mutex> lock(m);
bool match = false;
OBSWeakSource scene;
@ -393,10 +392,6 @@ void SwitcherData::Thread()
case round_trip_func:
checkSceneSequence(match, scene, transition,
lock);
if (sceneChangedDuringWait()) //scene might have changed during the sleep
{
goto startLoop;
}
break;
case media_func:
checkMediaSwitch(match, scene, transition);
@ -515,7 +510,6 @@ extern "C" void FreeSceneSwitcher()
void handleSceneChange(SwitcherData *s)
{
std::lock_guard<std::mutex> lock(s->m);
//stop waiting if scene was manually changed
if (s->sceneChangedDuringWait())
s->cv.notify_one();

View File

@ -183,7 +183,10 @@ void SwitcherData::checkSceneSequence(bool &match, OBSWeakSource &scene,
transition = s.transition;
if (verbose)
s.logMatch();
} else if (verbose) {
blog(LOG_INFO, "sequence canceled");
}
obs_source_release(currentSource2);
break;
}