From 87ac9c91bc235be20cdbcb057f6a3538cf95ba6c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 3 Dec 2014 22:14:23 -0800 Subject: [PATCH] libobs: Add flush to video pipeline On certain GPUs, if you don't flush and the window is minimized it can endlessly accumulate memory due to what I'm assuming are driver design flaws (though I can't know for sure). The flush seems to prevent this from happening, at least from my tests. It would be nice if this weren't necessary. --- libobs/obs-video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libobs/obs-video.c b/libobs/obs-video.c index c1fbfdaca..cdb2b41c6 100644 --- a/libobs/obs-video.c +++ b/libobs/obs-video.c @@ -424,6 +424,8 @@ static inline void output_frame(uint64_t timestamp) render_video(video, cur_texture, prev_texture, timestamp); frame_ready = download_frame(video, prev_texture, &frame); + gs_flush(); + gs_leave_context(); if (frame_ready) {