diff --git a/libavutil/opencl.c b/libavutil/opencl.c index 142c6b0bf2..f67eb5e66d 100644 --- a/libavutil/opencl.c +++ b/libavutil/opencl.c @@ -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; }