mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 17:42:28 +08:00
libobs: Copy both converted textures on stall for OpenGL
As the comment mentions this only occurs during an encoder stall on the first frame. On D3D both gs_texture_t's are actually a single D3D texture object and both planes are copied during gs_copy_texture, for everyone else we need to copy the textures separately as they are independent OpenGL textures.
This commit is contained in:
@@ -516,6 +516,13 @@ static inline bool queue_frame(struct obs_core_video_mix *video,
|
||||
* will ensure better performance. */
|
||||
if (raw_active || vframe_info->count > 1) {
|
||||
gs_copy_texture(tf.tex, video->convert_textures_encode[0]);
|
||||
#ifndef _WIN32
|
||||
/* Y and UV textures are views of the same texture on D3D, and
|
||||
* gs_copy_texture will copy all views of the underlying
|
||||
* texture. On other platforms, these are two distinct textures
|
||||
* that must be copied separately. */
|
||||
gs_copy_texture(tf.tex_uv, video->convert_textures_encode[1]);
|
||||
#endif
|
||||
} else {
|
||||
gs_texture_t *tex = video->convert_textures_encode[0];
|
||||
gs_texture_t *tex_uv = video->convert_textures_encode[1];
|
||||
|
||||
Reference in New Issue
Block a user