Use recursive mutex for scene mutex

Fixes a deadlock when trying to remove a source from the GUI. The scene
item signal handlers would mark the source as removed which results in
the video thread also trying to run obs_sceneitem_destroy thereby
deadlocking the video thread (and the GUI thread)
This commit is contained in:
Palana
2014-01-29 22:46:39 +01:00
parent 13db68433d
commit af03444cbe
3 changed files with 30 additions and 8 deletions

View File

@@ -515,10 +515,17 @@ void OBSBasic::on_actionRemoveSource_triggered()
if (!sel)
return;
obs_scene_t scene = GetCurrentScene();
if (!scene)
return;
obs_scene_addref(scene);
QVariant userData = sel->data(Qt::UserRole);
obs_sceneitem_t item = VariantPtr<obs_sceneitem_t>(userData);
obs_source_t source = obs_sceneitem_getsource(item);
obs_sceneitem_destroy(item);
obs_sceneitem_destroy(scene, item);
obs_scene_release(scene);
}
void OBSBasic::on_actionSourceProperties_triggered()