summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Walker <[email protected]>2015-09-21 23:37:31 +0200
committerTim Walker <[email protected]>2015-09-21 23:37:31 +0200
commit1be374b5dc275a6e66b1d660ed093234582afa63 (patch)
tree83a08aede15bcd125cc1996fd1d4378f396a0d6d
parentd9c5d97d86b7145b16387486f5c9ff527fad0570 (diff)
libhb: fix OpenCL initialization.
It was borken in 293083e5
-rw-r--r--libhb/work.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 11c8d2919..8ea9db918 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -624,11 +624,14 @@ static void do_job(hb_job_t *job)
* the library if we aren't going to use it. But we only call hb_ocl_close
* in hb_global_close, since un/reloading the library each run is wasteful.
*/
- if (job->use_opencl && (hb_ocl_init() || hb_init_opencl_run_env(0, NULL, "-I.")))
+ if (job->use_opencl)
{
- hb_log("work: failed to initialize OpenCL environment, using fallback");
- hb_release_opencl_run_env();
- job->use_opencl = 0;
+ if (hb_ocl_init() || hb_init_opencl_run_env(0, NULL, "-I."))
+ {
+ hb_log("work: failed to initialize OpenCL environment, using fallback");
+ hb_release_opencl_run_env();
+ job->use_opencl = 0;
+ }
}
else
{