diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-20 12:31:38 -0700 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-03-21 09:53:37 -0700 |
commit | fcc81cd940dc721773a91301c60755aa11010a86 (patch) | |
tree | 5c2579f59ca337fc91e3ccec0b0ec542933ad21d /video/out/hwdec | |
parent | f871294204529374dd3056f7b616381400233036 (diff) | |
download | mpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.bz2 mpv-fcc81cd940dc721773a91301c60755aa11010a86.tar.xz |
vo_gpu[_next]: hwdec: fix logging regression when probing
When I introduced the concept of lazy loading of hwdecs by img format,
I did not propagate the probing flag correctly, leading to the new
normal loading path not runnng with probing set, meaning that any
errors would show up, creating unnecessary noise.
This change fixes this regression.
Diffstat (limited to 'video/out/hwdec')
-rw-r--r-- | video/out/hwdec/hwdec_cuda.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/hwdec/hwdec_cuda.c b/video/out/hwdec/hwdec_cuda.c index 0fe0f7bda8..910d6a4078 100644 --- a/video/out/hwdec/hwdec_cuda.c +++ b/video/out/hwdec/hwdec_cuda.c @@ -74,10 +74,11 @@ static int cuda_init(struct ra_hwdec *hw) int ret = 0; struct cuda_hw_priv *p = hw->priv; CudaFunctions *cu; + int level = hw->probing ? MSGL_V : MSGL_ERR; ret = cuda_load_functions(&p->cu, NULL); if (ret != 0) { - MP_VERBOSE(hw, "Failed to load CUDA symbols\n"); + MP_MSG(hw, level, "Failed to load CUDA symbols\n"); return -1; } cu = p->cu; @@ -94,7 +95,8 @@ static int cuda_init(struct ra_hwdec *hw) } if (!p->ext_init || !p->ext_uninit) { - MP_VERBOSE(hw, "CUDA hwdec only works with OpenGL or Vulkan backends.\n"); + MP_MSG(hw, level, + "CUDA hwdec only works with OpenGL or Vulkan backends.\n"); return -1; } @@ -109,7 +111,7 @@ static int cuda_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; } |