libobs: Use autoreleasepool for graphics thread

Apparently necessary to clean up macOS leaks.
This commit is contained in:
jpark37
2020-06-08 09:38:00 -07:00
parent 05c9ddd229
commit 6aa50b3ef1
4 changed files with 144 additions and 94 deletions

View File

@@ -429,8 +429,13 @@ static int obs_init_video(struct obs_video_info *ovi)
if (pthread_mutex_init(&video->task_mutex, NULL) < 0)
return OBS_VIDEO_FAIL;
#ifdef __APPLE__
errorcode = pthread_create(&video->video_thread, NULL,
obs_graphics_thread_autorelease, obs);
#else
errorcode = pthread_create(&video->video_thread, NULL,
obs_graphics_thread, obs);
#endif
if (errorcode != 0)
return OBS_VIDEO_FAIL;