aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-01-18 23:22:28 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2017-01-20 10:29:36 +0100
commit6b0a3ee6f809c577ee5e3d7c38af03d08d51a13f (patch)
tree1b36105ab8375ba9ca41905dda8281588448157e /libavcodec/nvenc.c
parent5403d90f32656719a766254d77bbe4411e473eed (diff)
downloadffmpeg-6b0a3ee6f809c577ee5e3d7c38af03d08d51a13f.tar.gz
avcodec/nvenc: add logging for more error cases
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 27d1a2bfbb..7005465df6 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -325,12 +325,16 @@ static av_cold int nvenc_check_device(AVCodecContext *avctx, int idx)
}
cu_res = dl_fn->cuda_dl->cuDeviceGetName(name, sizeof(name), cu_device);
- if (cu_res != CUDA_SUCCESS)
+ if (cu_res != CUDA_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "cuDeviceGetName failed on device %d\n", idx);
return -1;
+ }
cu_res = dl_fn->cuda_dl->cuDeviceComputeCapability(&major, &minor, cu_device);
- if (cu_res != CUDA_SUCCESS)
+ if (cu_res != CUDA_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "cuDeviceComputeCapability failed on device %d\n", idx);
return -1;
+ }
av_log(avctx, loglevel, "[ GPU #%d - < %s > has Compute SM %d.%d ]\n", idx, name, major, minor);
if (((major << 4) | minor) < NVENC_CAP) {