mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs: Fix obs_view_remove only resetting the first matching mix
This commit is contained in:
+4
-3
@@ -192,9 +192,10 @@ void obs_view_remove(obs_view_t *view)
|
||||
return;
|
||||
|
||||
pthread_mutex_lock(&obs->video.mixes_mutex);
|
||||
size_t idx = find_mix_for_view(view);
|
||||
if (idx != DARRAY_INVALID)
|
||||
obs->video.mixes.array[idx]->view = NULL;
|
||||
for (size_t i = 0, num = obs->video.mixes.num; i < num; i++) {
|
||||
if (obs->video.mixes.array[i]->view == view)
|
||||
obs->video.mixes.array[i]->view = NULL;
|
||||
}
|
||||
set_main_mix();
|
||||
pthread_mutex_unlock(&obs->video.mixes_mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user