[FFmpeg-devel] [PATCH] libavcodec/libopenjpegenc: don't define OPJ_STATIC with openjpeg 2.1.1
Michael Bradshaw
mjbshaw at gmail.com
Tue Jul 26 15:10:42 EEST 2016
On Sun, Jul 24, 2016 at 10:09 PM, Kia <sadieperkins at riseup.net> 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
>
> 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>
> --
> 2.9.0
>
In addition to what James Almer asked, does this build on Windows with
mingw?
See https://github.com/uclouvain/openjpeg/issues/766
More information about the ffmpeg-devel
mailing list