aboutsummaryrefslogtreecommitdiff
path: root/src/capture/kms_cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-21 19:12:24 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-21 19:12:24 +0200
commit8b0723a4f20b115c8d3394bcdf24b60b4895a345 (patch)
tree31f872fcbcfb611091a7d6911ce3320df2f980dd /src/capture/kms_cuda.c
parenta1d31a5cf0b90d3afabc57d5a6f4ccdfb1eeb054 (diff)
Fix window capture
Diffstat (limited to 'src/capture/kms_cuda.c')
-rw-r--r--src/capture/kms_cuda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/capture/kms_cuda.c b/src/capture/kms_cuda.c
index e8a4212..c1d272e 100644
--- a/src/capture/kms_cuda.c
+++ b/src/capture/kms_cuda.c
@@ -163,8 +163,8 @@ static int gsr_capture_kms_cuda_start(gsr_capture *cap, AVCodecContext *video_co
cap_kms->capture_pos = monitor.pos;
cap_kms->capture_size = monitor.size;
- video_codec_context->width = max_int(2, even_number_ceil(cap_kms->capture_size.x));
- video_codec_context->height = max_int(2, even_number_ceil(cap_kms->capture_size.y));
+ video_codec_context->width = max_int(2, cap_kms->capture_size.x & ~1);
+ video_codec_context->height = max_int(2, cap_kms->capture_size.y & ~1);
/* Disable vsync */
cap_kms->params.egl->eglSwapInterval(cap_kms->params.egl->egl_display, 0);