summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrikanth G <[email protected]>2015-03-04 18:48:54 -0600
committerJames Almer <[email protected]>2015-03-06 17:28:03 -0300
commit7071b8192d26c51c751ec8f8e0bc809d7377c95f (patch)
treedf88b06d6a0851261b6c89e85114619a953f4519
parentd04bfdf0f792d3060fd919fae9ef3cd8e38ea9d7 (diff)
avutil/opencl: is_compiled flag not being cleared in av_opencl_uninit
When OpenCL kernels are compiled, is_compiled flag is being set for each kernel. But, in opencl uninit, this flag is not being cleared. This causes an error when an OpenCL kernel is tried on different OpenCL devices on same platform. Here is the patch with a fix Reviewed-by; Wei Gao <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 0f2359b86926ed33da4bd64ca76d84d03d5ad380)
-rw-r--r--libavutil/opencl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 0b4f83b910..f80cde7001 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -633,6 +633,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)