mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avcodec/nvenc: add logging for more error cases
This commit is contained in:
parent
5403d90f32
commit
6b0a3ee6f8
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user