From f0164f9d28c8d86a1a30c7dac03ee762cf55ad86 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 1 Jun 2018 07:44:44 -0700 Subject: [PATCH] libobs: Do not signal reorder while scene mutex locked Prevents a potential race condition with the scene mutex. --- libobs/obs-scene.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libobs/obs-scene.c b/libobs/obs-scene.c index e7f2fd104..564798063 100644 --- a/libobs/obs-scene.c +++ b/libobs/obs-scene.c @@ -1645,9 +1645,9 @@ void obs_sceneitem_set_order(obs_sceneitem_t *item, attach_sceneitem(scene, item, NULL); } - signal_reorder(item); - full_unlock(scene); + + signal_reorder(item); obs_scene_release(scene); } @@ -1677,9 +1677,9 @@ void obs_sceneitem_set_order_position(obs_sceneitem_t *item, attach_sceneitem(scene, item, next); } - signal_reorder(item); - full_unlock(scene); + + signal_reorder(item); obs_scene_release(scene); } @@ -1921,9 +1921,9 @@ bool obs_scene_reorder_items(obs_scene_t *scene, prev = item_order[i]; } - signal_reorder(scene->first_item); - full_unlock(scene); + + signal_reorder(scene->first_item); obs_scene_release(scene); return true; }