提交 eed1a51d 编写于 作者: J jp9000

libobs: Free main view separately from std. views

The main view does not need to worry about hiding/deactivation of
sources when it's being freed here, when the obs context is shutting
down in this section of obs, all the sources are being freed, thus
there's no need to worry about deactivating/hiding sources.
上级 8a55f3bd
......@@ -489,6 +489,17 @@ fail:
return data->valid;
}
void obs_main_view_free(struct obs_view *view)
{
if (!view) return;
for (size_t i = 0; i < MAX_CHANNELS; i++)
obs_source_release(view->channels[i]);
memset(view->channels, 0, sizeof(view->channels));
pthread_mutex_destroy(&view->channels_mutex);
}
#define FREE_OBS_LINKED_LIST(type) \
do { \
int unfreed = 0; \
......@@ -507,7 +518,7 @@ static void obs_free_data(void)
data->valid = false;
obs_view_free(&data->main_view);
obs_main_view_free(&data->main_view);
blog(LOG_INFO, "Freeing OBS context data");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册