From cfda696580a994055e4532a273ce86c867ffdac4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Jan 2017 09:57:01 +0100 Subject: build: explicitly check for FFmpeg vs. Libav, and their exact versions In a first pass, we check whether libavcodec is present. Then we try to compile a snippet and check for FFmpeg vs. Libav. (This could probably also be done by somehow checking the pkgconfig version. But pkg-config can't deal with that idiotic FFmpeg idea that a micro version number >= 100 identifies FFmpeg vs. Libav.) After that we check the project-specific version numbers. This means it can no longer happen that we accidentally allow older, unsupported versions of FFmpeg, just because the Libav version numbers are somehow this way. Also drop the resampler checks. We hardcode which resampler to each with each project. A user can no longer force use of libavresample with FFmpeg. --- common/av_log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/av_log.c b/common/av_log.c index e2a4c3316e..c779fe9c8d 100644 --- a/common/av_log.c +++ b/common/av_log.c @@ -42,10 +42,10 @@ #include #endif -#if HAVE_LIBAVRESAMPLE +#if HAVE_IS_LIBAV #include #endif -#if HAVE_LIBSWRESAMPLE +#if HAVE_IS_FFMPEG #include #endif @@ -197,10 +197,10 @@ bool print_libav_versions(struct mp_log *log, int v) {"libavformat", LIBAVFORMAT_VERSION_INT, avformat_version()}, {"libswscale", LIBSWSCALE_VERSION_INT, swscale_version()}, {"libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()}, -#if HAVE_LIBAVRESAMPLE +#if HAVE_IS_LIBAV {"libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()}, #endif -#if HAVE_LIBSWRESAMPLE +#if HAVE_IS_FFMPEG {"libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()}, #endif }; -- cgit v1.2.3