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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user