diff options
author | Philip Langdale <philipl@overt.org> | 2019-11-16 17:42:51 -0800 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2019-11-17 09:44:32 -0800 |
commit | a714ab0601908131756c3a2074c1fab9a7cddb18 (patch) | |
tree | c6e860356ba5bd210d04fb908c472c4b0908664a /video/out/hwdec/hwdec_cuda.c | |
parent | 78cf974375dee0334288697723022514403f81a6 (diff) | |
download | mpv-a714ab0601908131756c3a2074c1fab9a7cddb18.tar.bz2 mpv-a714ab0601908131756c3a2074c1fab9a7cddb18.tar.xz |
vo_gpu: hwdec_cuda: Reduce message level of errors while probing
We should only be printing errors that occur when not probing, to
avoid creating the impression that something is wrong - and errors
during probing isn't a problem.
Diffstat (limited to 'video/out/hwdec/hwdec_cuda.c')
-rw-r--r-- | video/out/hwdec/hwdec_cuda.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/hwdec/hwdec_cuda.c b/video/out/hwdec/hwdec_cuda.c index 2a2b296ccd..895fb07d61 100644 --- a/video/out/hwdec/hwdec_cuda.c +++ b/video/out/hwdec/hwdec_cuda.c @@ -37,6 +37,7 @@ int check_cu(const struct ra_hwdec *hw, CUresult err, const char *func) const char *err_string; struct cuda_hw_priv *p = hw->priv; + int level = hw->probing ? MSGL_V : MSGL_ERR; MP_TRACE(hw, "Calling %s\n", func); @@ -46,10 +47,10 @@ int check_cu(const struct ra_hwdec *hw, CUresult err, const char *func) p->cu->cuGetErrorName(err, &err_name); p->cu->cuGetErrorString(err, &err_string); - MP_ERR(hw, "%s failed", func); + MP_MSG(hw, level, "%s failed", func); if (err_name && err_string) - MP_ERR(hw, " -> %s: %s", err_name, err_string); - MP_ERR(hw, "\n"); + MP_MSG(hw, level, " -> %s: %s", err_name, err_string); + MP_MSG(hw, level, "\n"); return -1; } |