diff mbox

[FFmpeg-devel] lavu/hwcontext_opencl.h: fix build on macOS

Message ID 20171128053850.16491-1-rodger.combs@gmail.com
State Accepted
Commit 1204ce0b6371f5b51efdfe84d1b5aa5925809186
Headers show

Commit Message

Rodger Combs Nov. 28, 2017, 5:38 a.m. UTC
---
 libavutil/hwcontext_opencl.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jun Zhao Nov. 28, 2017, 6:19 a.m. UTC | #1
On 2017/11/28 13:38, Rodger Combs wrote:
> ---
>  libavutil/hwcontext_opencl.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/libavutil/hwcontext_opencl.h b/libavutil/hwcontext_opencl.h
> index 8e34df44cd..ef54486c95 100644
> --- a/libavutil/hwcontext_opencl.h
> +++ b/libavutil/hwcontext_opencl.h
> @@ -19,7 +19,11 @@
>  #ifndef AVUTIL_HWCONTEXT_OPENCL_H
>  #define AVUTIL_HWCONTEXT_OPENCL_H
>  
> +#ifdef __APPLE__
> +#include <OpenCL/cl.h>
> +#else
>  #include <CL/cl.h>
> +#endif
LGTM
>  
>  #include "frame.h"
>
diff mbox

Patch

diff --git a/libavutil/hwcontext_opencl.h b/libavutil/hwcontext_opencl.h
index 8e34df44cd..ef54486c95 100644
--- a/libavutil/hwcontext_opencl.h
+++ b/libavutil/hwcontext_opencl.h
@@ -19,7 +19,11 @@ 
 #ifndef AVUTIL_HWCONTEXT_OPENCL_H
 #define AVUTIL_HWCONTEXT_OPENCL_H
 
+#ifdef __APPLE__
+#include <OpenCL/cl.h>
+#else
 #include <CL/cl.h>
+#endif
 
 #include "frame.h"