Browse Source

avcodec/nvenc: add logging for more error cases

tags/n3.3
Timo Rothenpieler 8 years ago
parent
commit
6b0a3ee6f8
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavcodec/nvenc.c

+ 6
- 2
libavcodec/nvenc.c View File

@@ -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…
Cancel
Save