aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-07 22:53:04 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-08 11:35:30 +0100
commit3d9a7065280e64797c5a68c794a04d60fb3f767c (patch)
tree75ad01478ec31296bf24dfd56dd1881347a54f1e /src/capture/xcomposite_cuda.c
parent0d89378021b9e8913b521164d1bc436d9bc2630f (diff)
Set frame size to video codec context size, nicer rgb to nv12
Diffstat (limited to 'src/capture/xcomposite_cuda.c')
-rw-r--r--src/capture/xcomposite_cuda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/capture/xcomposite_cuda.c b/src/capture/xcomposite_cuda.c
index 1194edb..181aa70 100644
--- a/src/capture/xcomposite_cuda.c
+++ b/src/capture/xcomposite_cuda.c
@@ -204,6 +204,9 @@ static int gsr_capture_xcomposite_cuda_start(gsr_capture *cap, AVCodecContext *v
video_codec_context->height = max_int(2, cap_xcomp->params.region_size.y & ~1);
}
+ frame->width = video_codec_context->width;
+ frame->height = video_codec_context->height;
+
cap_xcomp->target_texture_id = gl_create_texture(cap_xcomp, video_codec_context->width, video_codec_context->height);
if(cap_xcomp->target_texture_id == 0) {
fprintf(stderr, "gsr error: gsr_capture_xcomposite_cuda_start: failed to create opengl texture\n");