summaryrefslogtreecommitdiff
path: root/libavutil/opencl.c
diff options
context:
space:
mode:
authorSrikanth G <gskanth@gmail.com>2015-03-04 18:48:54 -0600
committerMichael Niedermayer <michaelni@gmx.at>2015-03-06 15:20:12 +0100
commit0f2359b86926ed33da4bd64ca76d84d03d5ad380 (patch)
tree999e9e03f99452ad3368a58dedc873f3cdd3fef9 /libavutil/opencl.c
parentd6f5b3eee3ab76000b115419d4e0ad91241739a3 (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 <highgod0401@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opencl.c')
-rw-r--r--libavutil/opencl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 36cb6fe81d..a3866cae1d 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -611,6 +611,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)