[FFmpeg-devel] [PATCH] configure: disallow OpenCL with shared libs

James Almer jamrial at gmail.com
Wed Aug 13 00:31:58 CEST 2014


On 11/08/14 11:33 PM, Michael Niedermayer wrote:
> Its API is marked as experimental, we should not export experimental API
> from shared libs
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  configure |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 0ac6132..84d308e 100755
> --- a/configure
> +++ b/configure
> @@ -4861,7 +4861,9 @@ enabled opencl            && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl
>                                 die "ERROR: opencl not found"; } &&
>                               { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
>                                 check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
> -                               die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
> +                               die "ERROR: opencl must be installed and version must be 1.2 or compatible"; } &&
> +                             { enabled shared &&
> +                               die "ERROR OpenCL API is experimental and not safe to be used with shared libs"; }
>  enabled opengl            && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
>                                 check_lib2 windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
>                                 check_lib2 OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
> 

The API hasn't been touched in several months and is functional, and considering 
distros already link to opencl if available in previous ffmpeg releases, i don't 
know if removing the feature like this is a good idea.
Of course they can just remove this check and keep using opencl if they want to, 
but that's besides the point.

Maybe a warning instead?


More information about the ffmpeg-devel mailing list