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>
This commit is contained in:
Srikanth G 2015-03-04 18:48:54 -06:00 committed by Michael Niedermayer
parent d6f5b3eee3
commit 0f2359b869
1 changed files with 3 additions and 0 deletions

View File

@ -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)