From 416446b25cc8a1059d338ce7434924cccf953555 Mon Sep 17 00:00:00 2001 From: Boyuan Zhang Date: Wed, 2 Nov 2022 17:23:04 -0400 Subject: [PATCH] libs: context: use queried value for attrib Attribute's value should use returned value from get_attribute for VAConfigAttribRTFormat, since VAProfileHEVCMain10, in AMD Mesa Gallium, can process either VA_RT_FORMAT_420 and VA_RT_FORMAT_420_10, which isn't considered in gstreamer-vaapi design, where encoder's src pads will expose only 4:2:0 color formats but no 4:2:0 10bit. So, this is a workaround for this issue while new vah265enc is released. Signed-off-by: Boyuan Zhang Part-of: --- .../gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c index 88cd1105f3..0b97875b0a 100644 --- a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c +++ b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapicontext.c @@ -333,7 +333,7 @@ config_create (GstVaapiContext * context) string_of_va_chroma_format (va_chroma_format)); goto cleanup; } - attrib->value = va_chroma_format; + attrib->value = value; attrib = &attribs[++attrib_index]; g_assert (attrib_index < G_N_ELEMENTS (attribs));