mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
libobs: Hide sources when an obs_view is destroyed
This fixes a bug where sources would not decrement their showing references when an obs_view is destroyed.
This commit is contained in:
parent
eed1a51d3a
commit
ab520cab25
|
@ -48,8 +48,13 @@ void obs_view_free(struct obs_view *view)
|
|||
{
|
||||
if (!view) return;
|
||||
|
||||
for (size_t i = 0; i < MAX_CHANNELS; i++)
|
||||
obs_source_release(view->channels[i]);
|
||||
for (size_t i = 0; i < MAX_CHANNELS; i++) {
|
||||
struct obs_source *source = view->channels[i];
|
||||
if (source) {
|
||||
obs_source_deactivate(source, AUX_VIEW);
|
||||
obs_source_release(source);
|
||||
}
|
||||
}
|
||||
|
||||
memset(view->channels, 0, sizeof(view->channels));
|
||||
pthread_mutex_destroy(&view->channels_mutex);
|
||||
|
|
Loading…
Reference in a new issue