Codec resolution check: treat 0, 0 as no limit

Some devices such as Intel Xeon E3-1200 don't report max video
resolution. In such cases assume there is no limit and instead let
ffmepg (vaapi) fail when recording, if the resolution isn't supported.
This commit is contained in:
dec05eba
2025-09-23 17:33:44 +02:00
parent e4b801fc51
commit 8cf1a98c33
2 changed files with 3 additions and 1 deletions

View File

@@ -2701,6 +2701,8 @@ static vec2i codec_get_max_resolution(gsr_video_codec video_codec, bool use_soft
}
static bool codec_supports_resolution(vec2i codec_max_resolution, vec2i capture_resolution) {
if(codec_max_resolution.x == 0 || codec_max_resolution.y == 0)
return true;
return codec_max_resolution.x >= capture_resolution.x && codec_max_resolution.y >= capture_resolution.y;
}