[FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

Ricardo Constantino wiiaboo at gmail.com
Thu Oct 19 01:49:35 EEST 2017


On 18 October 2017 at 23:22, James Almer <jamrial at gmail.com> wrote:

> On 10/18/2017 6:56 PM, Michael Bradshaw wrote:
> > -DOPJ_STATIC was originally added to ffmpeg's configure script for
> Windows.
> > Unconditionally adding -DOPJ_STATIC would conflict with people who are
> > dynamically linking. I'll look into this further. I'll start with the
> > following:
> >
> > enabled libopenjpeg       && {{require_pkg_config libopenjpeg "libopenjp2
> >> = 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
> > -DOPJ_STATIC;} ||
> >                               require_pkg_config libopenjpeg "libopenjp2
> >=
> > 2.1.0" openjpeg.h opj_version;}
> >
> > and see if it works for both static and dynamic builds of OpenJPEG.
> > Unfortunately, I don't have a Windows system to test on, so if anyone can
> > validate the above on Windows I'd appreciate it.
>
> I have a Windows system. With a shared version of OpenJPEG the configure
> check seems to succeed with and without -DOPJ_STATIC, but with a static
> version it only succeed with it.
> Ideally, pkg-config would have something like a "Cflags.private" field,
> but it for some reason doesn't, so it's up to us to handle this.
>
> It think the following should be enough:
>
> > enabled libopenjpeg       && { use_pkg_config libopenjpeg "libopenjp2 >=
> 2.1.0" openjpeg.h opj_version ||
> >                                { require_pkg_config libopenjpeg
> "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
> -DOPJ_STATIC; } }
>
> To make sure -DOPJ_STATIC is not used unless strictly necessary.


There's a few other libs that require static-only Cflags (libxml2, at
least), so openjpeg shouldn't be different. pkgconf does support
Cflags.private, but no one uses it.


More information about the ffmpeg-devel mailing list