fix a crash on Linux
authoryao <bitwangyaoyao@gmail.com>
Fri, 31 May 2013 07:35:54 +0000 (15:35 +0800)
committeryao <bitwangyaoyao@gmail.com>
Fri, 31 May 2013 07:35:54 +0000 (15:35 +0800)
modules/ocl/src/pyrlk.cpp

index a3e65dd..8e94204 100644 (file)
@@ -142,7 +142,7 @@ static void lkSparse_run(oclMat &I, oclMat &J,
             int wave_size = queryDeviceInfo<WAVEFRONT_SIZE, int>(kernel);
             openCLSafeCall(clReleaseKernel(kernel));
 
-            static char opt[16] = {0};
+            static char opt[32] = {0};
             sprintf(opt, " -D WAVE_SIZE=%d", wave_size);
 
             openCLExecuteKernel(clCxt, &pyrlk, kernelName, globalThreads, localThreads,