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.
This commit is contained in:
parent
8a55f3bda7
commit
eed1a51d3a
13
libobs/obs.c
13
libobs/obs.c
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user