libobs: Ensure active copy surfaces are active
Stale surfaces can cause improper downloads from GPU, and lead to video corruption in certain cases.
This commit is contained in:
parent
3c390d8b5b
commit
1ac758a2ef
@ -392,22 +392,25 @@ stage_output_texture(struct obs_core_video *video, int cur_texture,
|
||||
|
||||
if (!video->gpu_conversion) {
|
||||
gs_stagesurf_t *copy = copy_surfaces[0];
|
||||
if (copy) {
|
||||
if (copy)
|
||||
gs_stage_texture(copy, video->output_texture);
|
||||
video->active_copy_surfaces[cur_texture][0] = copy;
|
||||
}
|
||||
video->active_copy_surfaces[cur_texture][0] = copy;
|
||||
|
||||
for (size_t i = 1; i < NUM_CHANNELS; ++i)
|
||||
video->active_copy_surfaces[cur_texture][i] = NULL;
|
||||
|
||||
video->textures_copied[cur_texture] = true;
|
||||
} else if (video->texture_converted) {
|
||||
for (size_t i = 0; i < channel_count; i++) {
|
||||
gs_stagesurf_t *copy = copy_surfaces[i];
|
||||
if (copy) {
|
||||
if (copy)
|
||||
gs_stage_texture(copy, convert_textures[i]);
|
||||
video->active_copy_surfaces[cur_texture][i] =
|
||||
copy;
|
||||
}
|
||||
video->active_copy_surfaces[cur_texture][i] = copy;
|
||||
}
|
||||
|
||||
for (size_t i = channel_count; i < NUM_CHANNELS; ++i)
|
||||
video->active_copy_surfaces[cur_texture][i] = NULL;
|
||||
|
||||
video->textures_copied[cur_texture] = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user