https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8736
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12914
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122561.html

From 3ac5bb2d3689bdb28363a2b2ca74301a010f73ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8736>
--- a/sys/va/gstvacaps.c
+++ b/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;
 
-- 
GitLab

