diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2017-01-18 23:22:28 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-01-20 10:29:36 +0100 |
commit | 6b0a3ee6f809c577ee5e3d7c38af03d08d51a13f (patch) | |
tree | 1b36105ab8375ba9ca41905dda8281588448157e /libavcodec/nvenc.c | |
parent | 5403d90f32656719a766254d77bbe4411e473eed (diff) | |
download | ffmpeg-6b0a3ee6f809c577ee5e3d7c38af03d08d51a13f.tar.gz |
avcodec/nvenc: add logging for more error cases
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r-- | libavcodec/nvenc.c | 8 |
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) { |