summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorScott <[email protected]>2017-01-15 14:25:55 +0000
committerGitHub <[email protected]>2017-01-15 14:25:55 +0000
commitc72b80dcb7cb063b40c43a47761ba2919ef85c46 (patch)
tree35058affc3a5c7bc2eedf7506eede32db5dd2f9b /libhb/scan.c
parent7545b0a6c242815fc31da306ff93d156bdee7ef4 (diff)
opencl: Workaround broken drivers that crash when you call clGetPlatformIDs with valid inputs. #496
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index e612f2a98..da7379c0f 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -1021,8 +1021,12 @@ skip_preview:
title->video_decode_support = vid_info.video_decode_support;
// TODO: check video dimensions
- title->opencl_support = !!hb_opencl_available();
-
+ hb_handle_t *hb_handle = (hb_handle_t *)data->h;
+ if (hb_get_opencl_enabled(hb_handle))
+ {
+ title->opencl_support = !!hb_opencl_available();
+ }
+
// compute the aspect ratio based on the storage dimensions and PAR.
hb_reduce(&title->dar.num, &title->dar.den,
title->geometry.par.num * title->geometry.width,