OpenCL uninit bug fix - clear is_compiled flag
authorsrikanth <gskanth@gmail.com>
Mon, 9 Mar 2015 22:34:49 +0000 (17:34 -0500)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Mar 2015 21:52:19 +0000 (22:52 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opencl.c

index 36cb6fe..2df5653 100644 (file)
@@ -588,6 +588,7 @@ end:
 
 void av_opencl_uninit(void)
 {
+    int i;
     cl_int status;
     LOCK_OPENCL;
     opencl_ctx.init_count--;
@@ -611,6 +612,9 @@ void av_opencl_uninit(void)
         }
         opencl_ctx.context = NULL;
     }
+    for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
+        opencl_ctx.kernel_code[i].is_compiled = 0;
+    }
     free_device_list(&opencl_ctx.device_list);
 end:
     if (opencl_ctx.init_count <= 0)