commit:     0dedddf88890cb680d3d2c767158fa5e8f906cd5
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Oct 22 04:07:16 2025 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Wed Jan 14 11:33:11 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dedddf8

media-libs/gst-plugins-bad: backport workaround for buggy amdgpu

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 ....24.13-va-skip-codecs-with-bad-resolution.patch | 34 ++++++++++++++++++++++
 .../gst-plugins-bad/gst-plugins-bad-1.24.13.ebuild |  1 +
 2 files changed, 35 insertions(+)

diff --git 
a/media-libs/gst-plugins-bad/files/gst-plugins-bad-1.24.13-va-skip-codecs-with-bad-resolution.patch
 
b/media-libs/gst-plugins-bad/files/gst-plugins-bad-1.24.13-va-skip-codecs-with-bad-resolution.patch
new file mode 100644
index 000000000000..fbce7ef0cfb0
--- /dev/null
+++ 
b/media-libs/gst-plugins-bad/files/gst-plugins-bad-1.24.13-va-skip-codecs-with-bad-resolution.patch
@@ -0,0 +1,34 @@
+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?= <[email protected]>
+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
+

diff --git a/media-libs/gst-plugins-bad/gst-plugins-bad-1.24.13.ebuild 
b/media-libs/gst-plugins-bad/gst-plugins-bad-1.24.13.ebuild
index ca29af966cd9..0265a666ccb6 100644
--- a/media-libs/gst-plugins-bad/gst-plugins-bad-1.24.13.ebuild
+++ b/media-libs/gst-plugins-bad/gst-plugins-bad-1.24.13.ebuild
@@ -49,6 +49,7 @@ DOCS=( AUTHORS ChangeLog NEWS README.md RELEASE )
 PATCHES=(
        "${FILESDIR}"/0001-analyticsoverlay-move-option-to-right-section.patch
        "${FILESDIR}"/0002-codec2json-move-option-to-right-section.patch
+       
"${FILESDIR}"/gst-plugins-bad-1.24.13-va-skip-codecs-with-bad-resolution.patch
 )
 
 src_prepare() {

Reply via email to