From 2f90bcf684d4bdea7318cbe83334f2f8486b2b13 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 12 Mar 2019 12:52:26 -0700 Subject: [PATCH] libobs: Fix frame not being cleared Fixes the remaining case where a frame from the previous recording/stream could show up at the beginning of the next recording/stream on the same running session when using the new version of NVENC. Textures are being converted for both raw and texture-based encoders, so this variable which determines whether a texture is ready and has been converted should be cleared in both cases. --- libobs/obs-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-video.c b/libobs/obs-video.c index 13a840cd9..c7eba420d 100644 --- a/libobs/obs-video.c +++ b/libobs/obs-video.c @@ -811,6 +811,7 @@ static void clear_base_frame_data(void) struct obs_core_video *video = &obs->video; memset(video->textures_rendered, 0, sizeof(video->textures_rendered)); memset(video->textures_output, 0, sizeof(video->textures_output)); + memset(video->textures_converted, 0, sizeof(video->textures_converted)); circlebuf_free(&video->vframe_info_buffer); video->cur_texture = 0; } @@ -819,7 +820,6 @@ static void clear_raw_frame_data(void) { struct obs_core_video *video = &obs->video; memset(video->textures_copied, 0, sizeof(video->textures_copied)); - memset(video->textures_converted, 0, sizeof(video->textures_converted)); circlebuf_free(&video->vframe_info_buffer); }