From 5441103c8a15d7c12835a729ec5c13ae9ecffe43 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Mon, 31 Mar 2025 12:37:04 +0100 Subject: [PATCH] check-va-api: Convert an assertion into a graceful error Signed-off-by: Simon McVittie <smcv@collabora.com> --- helpers/check-va-api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helpers/check-va-api.c b/helpers/check-va-api.c index 1ee8d757..c8b2fab8 100644 --- a/helpers/check-va-api.c +++ b/helpers/check-va-api.c @@ -262,7 +262,11 @@ create_surfaces (VADisplay va_display, } } - assert (image_format.fourcc == fourcc); + if (image_format.fourcc != fourcc) + { + fprintf (stderr, "Unable to find an image format with fourcc 0x%08x\n", fourcc); + goto out; + } attr.type = VASurfaceAttribPixelFormat; attr.flags = VA_SURFACE_ATTRIB_SETTABLE; -- GitLab