Fix screenshot with region not working correctly for some sizes and possibly crashing

This commit is contained in:
dec05eba
2025-03-13 01:38:26 +01:00
parent 92492db788
commit af54684103
10 changed files with 51 additions and 27 deletions

View File

@@ -138,6 +138,9 @@ static bool gsr_video_encoder_nvenc_start(gsr_video_encoder *encoder, AVCodecCon
return false;
}
video_codec_context->width = FFALIGN(video_codec_context->width, 2);
video_codec_context->height = FFALIGN(video_codec_context->height, 2);
if(video_codec_context->width < 128)
video_codec_context->width = 128;