Преглед на файлове

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.
jp9000 преди 6 години
родител
ревизия
2f90bcf684
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      libobs/obs-video.c

+ 1 - 1
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);
 }