From 7918545caf7e4ab6ae0e7e7f45e9abde77254c72 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 3 Jun 2023 18:35:49 -0700 Subject: hwdec_vulkan: respect probing flag when logging during init All hwdecs should respect the probing flag and demote their lgoging to verbose level, so that initialisation failures during probing do not spam the user. I forgot to do this for the Vulkan hwdec. --- video/out/hwdec/hwdec_vulkan.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/out/hwdec/hwdec_vulkan.c b/video/out/hwdec/hwdec_vulkan.c index f85d6222e5..f08e3380f1 100644 --- a/video/out/hwdec/hwdec_vulkan.c +++ b/video/out/hwdec/hwdec_vulkan.c @@ -55,16 +55,17 @@ static int vulkan_init(struct ra_hwdec *hw) AVBufferRef *hw_device_ctx = NULL; int ret = 0; struct vulkan_hw_priv *p = hw->priv; + int level = hw->probing ? MSGL_V : MSGL_ERR; struct mpvk_ctx *vk = ra_vk_ctx_get(hw->ra_ctx); if (!vk) { - MP_ERR(hw, "This is not a libplacebo vulkan gpu api context.\n"); + MP_MSG(hw, level, "This is not a libplacebo vulkan gpu api context.\n"); return 0; } p->gpu = ra_pl_get(hw->ra_ctx->ra); if (!p->gpu) { - MP_ERR(hw, "Failed to obtain pl_gpu.\n"); + MP_MSG(hw, level, "Failed to obtain pl_gpu.\n"); return 0; } @@ -124,7 +125,7 @@ static int vulkan_init(struct ra_hwdec *hw) ret = av_hwdevice_ctx_init(hw_device_ctx); if (ret < 0) { - MP_ERR(hw, "av_hwdevice_ctx_init failed\n"); + MP_MSG(hw, level, "av_hwdevice_ctx_init failed\n"); goto error; } -- cgit v1.2.3