summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-12-15 12:57:55 +0000
committersr55 <[email protected]>2019-12-15 12:57:55 +0000
commitac80446887e1593e95ab5a46a0be300cf067716a (patch)
tree6d6d05a6493e15498a07fc077bcddc69d2842116
parentcec282be54a779bb818967866852db444eacf554 (diff)
nvenc: Disable API version check for latest API pack. Affects #2379
-rw-r--r--libhb/nvenc_common.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/libhb/nvenc_common.c b/libhb/nvenc_common.c
index 15d7969ee..a4c48bf09 100644
--- a/libhb/nvenc_common.c
+++ b/libhb/nvenc_common.c
@@ -59,21 +59,15 @@ int hb_check_nvenc_available()
}
NVENCSTATUS apiErr = nvenc_dl->NvEncodeAPIGetMaxSupportedVersion(&nvenc_ver);
- if (apiErr != NV_ENC_SUCCESS)
- {
+ if (apiErr != NV_ENC_SUCCESS) {
isAvailable = 0;
return 0;
+ } else {
+ hb_log("Nvenc version %d.%d\n", nvenc_ver >> 4, nvenc_ver & 0xf);
+ isAvailable = 1;
}
- hb_log("Nvenc version %d.%d\n", nvenc_ver >> 4, nvenc_ver & 0xf);
- if ((NVENCAPI_MAJOR_VERSION << 4 | NVENCAPI_MINOR_VERSION) > nvenc_ver) {
- hb_log("NVENC version not supported. Disabling feature.");
- isAvailable = 0;
- return 0;
- }
-
- isAvailable = 1;
- return 1;
+ return isAvailable;
#else
return 0;
#endif