diff --git a/helpers/check-va-api.c b/helpers/check-va-api.c
index 1ee8d75775e124ac39412224e418a2df38f30538..c8b2fab860d98474553b2a16e8891888034b033e 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;