提交 ab520cab 编写于 作者: J jp9000

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.
上级 eed1a51d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册