From 3ac5bb2d3689bdb28363a2b2ca74301a010f73ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 30 Mar 2025 13:10:42 +0300 Subject: [PATCH] va: Skip codecs that report maximum width or height lower than minimum This happens on F42 with the JPEG decoders for some reason and trying to actually use them with any resolution simply gives a "resolution not supported" error. A minimum of 64 is correctly reported though and trying to create caps with an int range of [64, 0] gives critical warnings. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvacaps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c index 4bc0cc96e0..2f281a1ae5 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c @@ -350,6 +350,10 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config) if (formats->len == 0) goto bail; + /* if driver reports maximum width or height lower than minimum then skip */ + if (max_width < min_width || max_height < min_height) + goto bail; + if (!fix_raw_formats (display, profile, entrypoint, formats)) goto bail;