1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/opencl: fix a segmentfault in libavutil/opencl.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Y.C. Liu 2014-04-22 22:24:22 +08:00 committed by Michael Niedermayer
parent 6e5cce1cbe
commit cebe06a0bf

View File

@ -169,7 +169,7 @@ static const OpenclErrorMsg opencl_err_msg[] = {
const char *av_opencl_errstr(cl_int status)
{
int i;
for (i = 0; i < sizeof(opencl_err_msg); i++) {
for (i = 0; i < FF_ARRAY_ELEMS(opencl_err_msg); i++) {
if (opencl_err_msg[i].err_code == status)
return opencl_err_msg[i].err_str;
}