aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec_query
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-09-23 17:33:44 +0200
committerdec05eba <dec05eba@protonmail.com>2025-09-23 17:33:44 +0200
commit8cf1a98c3393a91d6f6171951d3b3e4ac9a58e3d (patch)
treec85af877c045fac5d1e2144df4357b78f481bcf1 /src/codec_query
parente4b801fc51cf8483dd1584a4e5fb11e95bf8a62f (diff)
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.
Diffstat (limited to 'src/codec_query')
-rw-r--r--src/codec_query/vaapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codec_query/vaapi.c b/src/codec_query/vaapi.c
index 6f36eab..0943450 100644
--- a/src/codec_query/vaapi.c
+++ b/src/codec_query/vaapi.c
@@ -87,7 +87,7 @@ static vec2i profile_entrypoint_get_max_resolution(VADisplay va_dpy, VAProfile p
.type = VAConfigAttribMaxPictureHeight,
}
};
- if(vaGetConfigAttributes(va_dpy, profile, entrypoint, attribs, 2) != VA_STATUS_SUCCESS)
+ if(vaGetConfigAttributes(va_dpy, profile, entrypoint, attribs, 2) != VA_STATUS_SUCCESS || (attribs[0].value & VA_ATTRIB_NOT_SUPPORTED) || (attribs[1].value & VA_ATTRIB_NOT_SUPPORTED))
return (vec2i){0, 0};
return (vec2i){ attribs[0].value, attribs[1].value };