[FFmpeg-devel] [PATCH]configure: Fix libopus detection

Clément Bœsch u at pkh.me
Wed May 3 10:39:00 EEST 2017


On Tue, May 02, 2017 at 03:01:46PM -0700, Aaron Levinson wrote:
> On 4/25/2017 1:19 AM, Carl Eugen Hoyos wrote:
> > 2017-04-13 1:08 GMT+02:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> > > 2017-03-30 1:52 GMT+02:00 James Almer <jamrial at gmail.com>:
> > > > On 3/29/2017 7:47 PM, Carl Eugen Hoyos wrote:
> > > > > Hi!
> > > > > 
> > > > > Attached patch fixes a compilation error here.
> > > > > 
> > > > > Please test for success, Carl Eugen
> > > > > 
> > > > > 
> > > > > 0001-configure-Fix-libopus-detection.patch
> > > > > 
> > > > > 
> > > > > From 600b568651c60f8de609f211c814b5cd0640e584 Mon Sep 17 00:00:00 2001
> > > > > From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> > > > > Date: Thu, 30 Mar 2017 00:45:06 +0200
> > > > > Subject: [PATCH] configure: Fix libopus detection.
> > > > > 
> > > > > Avoids a compilation error for old libopus.
> > > > > Regression since 37941878
> > > > > ---
> > > > >  configure |    2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/configure b/configure
> > > > > index a84b126..76a287e 100755
> > > > > --- a/configure
> > > > > +++ b/configure
> > > > > @@ -5797,7 +5797,7 @@ enabled libopenjpeg       && { { check_lib openjpeg-2.1/openjpeg.h opj_version -
> > > > >                                 { check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
> > > > >                                 die "ERROR: libopenjpeg not found"; }
> > > > >  enabled libopenmpt        && require_pkg_config "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create
> > > > > -enabled libopus           && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
> > > > > +enabled libopus           && require_pkg_config opus opus_multistream.h opus_multistream_surround_encoder_create
> > > > 
> > > > Should be ok,
> > > 
> > > > but strictly speaking, this function is needed by the
> > > > encoder and not the decoder. Something like
> > > > 
> > > > enabled libopus           && {
> > > >     enabled libopus_decoder && {
> > > >         require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
> > > >     }
> > > >     enabled libopus_encoder && {
> > > >         use_pkg_config "opus >= 1.1" opus_multistream.h opus_multistream_surround_encoder_create ||
> > > >             disable libopus_encoder;
> > > >     }
> > > > }
> > > 
> > > Please commit this if you prefer it.
> > 
> > Ping.
> 
> Perhaps you could submit a new patch that modifies configure in the fashion
> suggested by James Almer.  Technically, it is possible to enable the libopus
> decoder independently of the libopus encoder, and if that is done, it won't
> build libopusenc.c.  But, with your original patch, it won't even permit
> configure to succeed even though such a build would be possible.  It is true
> that the approach currently taken in configure doesn't distinguish between
> encoding and decoding, but the patch as originally proposed just trades
> decoding API requirements for encoding API requirements.
> 

Basically, something similar to what is done with libvpx.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170503/c5b06781/attachment.sig>


More information about the ffmpeg-devel mailing list