From 0568af521ef3eed3e811fb4bebff050b559dbf53 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Mon, 19 Mar 2018 22:52:51 +0000 Subject: lavfi/opencl: Avoid deprecation warnings when built with post-1.2 headers The intended target is OpenCL 1.2, so disable warnings for APIs deprecated after that. This primarily applies to clCreateCommandQueue(), we can't use the replacement clCreateCommandQueueWithProperties() because it was introduced in OpenCL 2.0. Also remove some unnecessary includes from overlay and program filters so that the define is available at the right moment. --- libavfilter/opencl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavfilter/opencl.h') diff --git a/libavfilter/opencl.h b/libavfilter/opencl.h index 45fe2a2..c0a4519 100644 --- a/libavfilter/opencl.h +++ b/libavfilter/opencl.h @@ -19,6 +19,12 @@ #ifndef AVFILTER_OPENCL_H #define AVFILTER_OPENCL_H +// The intended target is OpenCL 1.2, so disable warnings for APIs +// deprecated after that. This primarily applies to clCreateCommandQueue(), +// we can't use the replacement clCreateCommandQueueWithProperties() because +// it was introduced in OpenCL 2.0. +#define CL_USE_DEPRECATED_OPENCL_1_2_APIS + #include "libavutil/buffer.h" #include "libavutil/hwcontext.h" #include "libavutil/hwcontext_opencl.h" -- cgit v1.1