[FFmpeg-devel] [PATCH] libavcodec/libopenjpegenc: don't define OPJ_STATIC with openjpeg 2.1.1

James Almer jamrial at gmail.com
Tue Jul 26 02:43:24 EEST 2016


On 7/25/2016 2:09 AM, Kia wrote:
> This fixes bug #5694 and builds with libopenjpeg 2.1.1.
> 
> openjpeg commit 3ed5858902055d3500a6ab183f1395686921d026 hides all
> symbols with __attribute__ ((visibility ("hidden"))) if OPJ_STATIC is
> defined

Does this affect libopenjpeg 2.1.0 in any way? And should the
configure check for 2.1 be updated as well? It defines OPJ_STATIC
to detect libopenjpeg by trying to compile a test program calling
opj_version().

> 
> Signed-off-by: Kia <sadieperkins at riseup.net>
> ---
>  libavcodec/libopenjpegdec.c | 1 +
>  libavcodec/libopenjpegenc.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
> index 65167e6..efc0648 100644
> --- a/libavcodec/libopenjpegdec.c
> +++ b/libavcodec/libopenjpegdec.c
> @@ -37,6 +37,7 @@
>  #include "thread.h"
>  
>  #if HAVE_OPENJPEG_2_1_OPENJPEG_H
> +#undef  OPJ_STATIC
>  #  include <openjpeg-2.1/openjpeg.h>
>  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
>  #  include <openjpeg-2.0/openjpeg.h>
> diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
> index 1443551..2bc75e2 100644
> --- a/libavcodec/libopenjpegenc.c
> +++ b/libavcodec/libopenjpegenc.c
> @@ -35,6 +35,7 @@
>  #include "internal.h"
>  
>  #if HAVE_OPENJPEG_2_1_OPENJPEG_H
> +#undef  OPJ_STATIC
>  #  include <openjpeg-2.1/openjpeg.h>
>  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
>  #  include <openjpeg-2.0/openjpeg.h>
> 



More information about the ffmpeg-devel mailing list