Commit 730f3c49 authored by srikanth's avatar srikanth Committed by Michael Niedermayer

OpenCL uninit bug fix - clear is_compiled flag

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b425b81f
...@@ -588,6 +588,7 @@ end: ...@@ -588,6 +588,7 @@ end:
void av_opencl_uninit(void) void av_opencl_uninit(void)
{ {
int i;
cl_int status; cl_int status;
LOCK_OPENCL; LOCK_OPENCL;
opencl_ctx.init_count--; opencl_ctx.init_count--;
...@@ -611,6 +612,9 @@ void av_opencl_uninit(void) ...@@ -611,6 +612,9 @@ void av_opencl_uninit(void)
} }
opencl_ctx.context = NULL; 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); free_device_list(&opencl_ctx.device_list);
end: end:
if (opencl_ctx.init_count <= 0) if (opencl_ctx.init_count <= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment