From c7d444a96b456843e2774610a06879218faf6e4b Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 17 Mar 2017 10:32:22 +0100 Subject: [PATCH] python/lib/moresetuptools.py: check for libswresample, prefer to libavresample --- python/lib/moresetuptools.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/python/lib/moresetuptools.py b/python/lib/moresetuptools.py index 5bfd856e..08d51846 100644 --- a/python/lib/moresetuptools.py +++ b/python/lib/moresetuptools.py @@ -112,7 +112,8 @@ def add_local_macros(ext, usedouble = False): def add_external_deps(ext, usedouble = False): # loof for additional packages print("Info: looking for *optional* additional packages") - packages = ['libavcodec', 'libavformat', 'libavutil', 'libavresample', + packages = ['libavcodec', 'libavformat', 'libavutil', + 'libswresample', 'libavresample', 'sndfile', #'fftw3f', ] @@ -124,9 +125,13 @@ def add_external_deps(ext, usedouble = False): add_packages(packages, ext=ext) if 'avcodec' in ext.libraries \ and 'avformat' in ext.libraries \ - and 'avutil' in ext.libraries \ - and 'avresample' in ext.libraries: - ext.define_macros += [('HAVE_LIBAV', 1)] + and 'avutil' in ext.libraries: + if 'swresample' in ext.libraries: + ext.define_macros += [('HAVE_SWRESAMPLE', 1)] + elif 'avresample' in ext.libraries: + ext.define_macros += [('HAVE_AVRESAMPLE', 1)] + if 'swresample' in ext.libraries or 'avresample' in ext.libraries: + ext.define_macros += [('HAVE_LIBAV', 1)] if 'sndfile' in ext.libraries: ext.define_macros += [('HAVE_SNDFILE', 1)] if 'samplerate' in ext.libraries: -- 2.11.0