]> granicus.if.org Git - handbrake/commitdiff
OpenCL: work: fix logging of job->use_opencl; it was done before setting it instead...
authorRodeo <tdskywalker@gmail.com>
Sun, 19 May 2013 14:21:08 +0000 (14:21 +0000)
committerRodeo <tdskywalker@gmail.com>
Sun, 19 May 2013 14:21:08 +0000 (14:21 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5482 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/work.c

index 49d07ada524d42850cdf5f6825568f809ea001f7..0739bd90dabe0e996c15adffcfa2203bdf7eba4a 100644 (file)
@@ -542,18 +542,24 @@ static void do_job( hb_job_t * job )
 
     job->list_work = hb_list_init();
 
+#ifdef USE_OPENCL
+    /* init opencl environment */
+    if (job->use_opencl)
+        job->use_opencl = !hb_init_opencl_run_env(0, NULL, "-I.");
+#else
+    job->use_opencl = 0;
+#endif
+
     hb_log( "starting job" );
-    if( job->use_opencl || job->use_hwd )
+
+    if (job->use_opencl || job->use_hwd)
     {
-        hb_log( "Using GPU : Yes." );
-        /* init opencl environment */ 
-#ifdef USE_OPENCL
-        if( job->use_opencl )
-            job->use_opencl =! hb_init_opencl_run_env( 0, NULL, "-I." );
-#endif    
+        hb_log("Using GPU: Yes.");
     }
     else
-        hb_log( "Using GPU : NO." );
+    {
+        hb_log("Using GPU: NO.");
+    }
     /* Look for the scanned subtitle in the existing subtitle list
      * select_subtitle implies that we did a scan. */
     if( !job->indepth_scan && interjob->select_subtitle )