From b33ced193e0317abde33e1ace1b569276b32e50d Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 16 Jun 2019 10:31:25 -0700 Subject: vo_gpu: hwdec_vaapi: Suppress format errors when probing Today, we normally see a format error when probing because yuyv422 cannot be used, but it's in the normal set of probed formats. This error is distracting and confusing, so only log probing errors at the VERBOSE level. Fixes #6411 --- video/out/hwdec/hwdec_vaapi.c | 3 ++- video/vaapi.h | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index eed79799e9..8ca2ab134e 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -417,7 +417,8 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) VA_EXPORT_SURFACE_READ_ONLY | VA_EXPORT_SURFACE_SEPARATE_LAYERS, &p->desc); - if (!CHECK_VA_STATUS(mapper, "vaExportSurfaceHandle()")) { + if (!CHECK_VA_STATUS_LEVEL(mapper, "vaExportSurfaceHandle()", + p_owner->probing_formats ? MSGL_V : MSGL_ERR)) { if (status == VA_STATUS_ERROR_UNIMPLEMENTED) p->esh_not_implemented = true; goto esh_failed; diff --git a/video/vaapi.h b/video/vaapi.h index b2c31d8a74..6de90b7616 100644 --- a/video/vaapi.h +++ b/video/vaapi.h @@ -36,9 +36,12 @@ struct mp_vaapi_ctx { void (*destroy_native_ctx)(void *native_ctx); }; -#define CHECK_VA_STATUS(ctx, msg) \ +#define CHECK_VA_STATUS_LEVEL(ctx, msg, level) \ (status == VA_STATUS_SUCCESS ? true \ - : (MP_ERR(ctx, "%s failed (%s)\n", msg, vaErrorStr(status)), false)) + : (MP_MSG(ctx, level, "%s failed (%s)\n", msg, vaErrorStr(status)), false)) + +#define CHECK_VA_STATUS(ctx, msg) \ + CHECK_VA_STATUS_LEVEL(ctx, msg, MSGL_ERR) int va_get_colorspace_flag(enum mp_csp csp); -- cgit v1.2.3