diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/capture/xcomposite_cuda.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/capture/xcomposite_cuda.c b/src/capture/xcomposite_cuda.c index 1ce80f5..a812c12 100644 --- a/src/capture/xcomposite_cuda.c +++ b/src/capture/xcomposite_cuda.c @@ -210,8 +210,8 @@ static int gsr_capture_xcomposite_cuda_start(gsr_capture *cap, AVCodecContext *v video_codec_context->height = cap_xcomp->texture_size.y; if(cap_xcomp->params.region_size.x > 0 && cap_xcomp->params.region_size.y) { - video_codec_context->width = cap_xcomp->params.region_size.x; - video_codec_context->height = cap_xcomp->params.region_size.y; + video_codec_context->width = max_int(2, cap_xcomp->params.region_size.x & ~1); + video_codec_context->height = max_int(2, cap_xcomp->params.region_size.y & ~1); } cap_xcomp->target_texture_id = gl_create_texture(cap_xcomp, video_codec_context->width, video_codec_context->height); |