]> granicus.if.org Git - handbrake/commitdiff
modified the opencl init error. it can work well with mingw64 compiled.
authorhandbrake <no-reply@handbrake.fr>
Tue, 22 Jan 2013 08:58:10 +0000 (08:58 +0000)
committerhandbrake <no-reply@handbrake.fr>
Tue, 22 Jan 2013 08:58:10 +0000 (08:58 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5190 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/openclwrapper.c

index 3a0f12f3e3297d704e59833c2d06ff9f77c6153f..a10e9d64d63a7645e3df2cdb23a26789ea24cbdc 100644 (file)
@@ -656,6 +656,8 @@ int hb_compile_kernel_file( const char *filename, GPUEnv *gpu_info,
 \r
 #ifdef USE_EXTERNAL_KERNEL\r
     status = hb_convert_to_string( filename, &source_str, gpu_info, idx );\r
+    if( status == 0 )\r
+        return(0);\r
 #else\r
     int kernel_src_size = strlen( kernel_src_hscale )+strlen( kernel_src_vscale )+strlen( kernel_src_nvtoyuv );\r
     source_str = (char*)malloc( kernel_src_size+2 );\r
@@ -664,8 +666,6 @@ int hb_compile_kernel_file( const char *filename, GPUEnv *gpu_info,
     strcat( source_str, kernel_src_nvtoyuv );\r
 #endif\r
 \r
-    if( status == 0 )\r
-        return(0);\r
 \r
     source = source_str;\r
     source_size[0] = strlen( source );\r