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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8736>
This commit is contained in:
Sebastian Dröge 2025-03-30 13:10:42 +03:00 committed by GStreamer Marge Bot
parent 6e9667b65c
commit 3ac5bb2d36

View File

@ -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;