Skip to content
Snippets Groups Projects
Commit 6b0a3ee6 authored by Timo Rothenpieler's avatar Timo Rothenpieler
Browse files

avcodec/nvenc: add logging for more error cases

parent 5403d90f
No related branches found
No related tags found
No related merge requests found
...@@ -325,12 +325,16 @@ static av_cold int nvenc_check_device(AVCodecContext *avctx, int idx) ...@@ -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); 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; return -1;
}
cu_res = dl_fn->cuda_dl->cuDeviceComputeCapability(&major, &minor, cu_device); 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; return -1;
}
av_log(avctx, loglevel, "[ GPU #%d - < %s > has Compute SM %d.%d ]\n", idx, name, major, minor); av_log(avctx, loglevel, "[ GPU #%d - < %s > has Compute SM %d.%d ]\n", idx, name, major, minor);
if (((major << 4) | minor) < NVENC_CAP) { if (((major << 4) | minor) < NVENC_CAP) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment