diff options
author | Philip Langdale <philipl@overt.org> | 2023-06-03 18:35:49 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2023-06-03 18:37:43 -0700 |
commit | 7918545caf7e4ab6ae0e7e7f45e9abde77254c72 (patch) | |
tree | 4d6712d11c9327ce1affd64787046164fb1974a1 /video | |
parent | ba6af0fb15c65ac1d8ca468b5d3aa29a32e9f8cc (diff) | |
download | mpv-7918545caf7e4ab6ae0e7e7f45e9abde77254c72.tar.bz2 mpv-7918545caf7e4ab6ae0e7e7f45e9abde77254c72.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/hwdec/hwdec_vulkan.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } |