Merge pull request #2429 from jpark37/linux-leak

libobs: Pump graphics loop one final time for cleanup
This commit is contained in:
Jim 2020-02-23 21:38:03 -08:00 committed by GitHub
commit 4b3a27c0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -844,7 +844,11 @@ void *obs_graphics_thread(void *param)
srand((unsigned int)time(NULL));
while (!video_output_stopped(obs->video.video)) {
for (;;) {
/* defer loop break to clean up sources */
const bool stop_requested =
video_output_stopped(obs->video.video);
uint64_t frame_start = os_gettime_ns();
uint64_t frame_time_ns;
bool raw_active = obs->video.raw_active > 0;
@ -920,6 +924,9 @@ void *obs_graphics_thread(void *param)
fps_total_ns = 0;
fps_total_frames = 0;
}
if (stop_requested)
break;
}
UNUSED_PARAMETER(param);