summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-27 09:57:01 +0100
committerwm4 <wm4@nowhere>2017-01-27 09:57:01 +0100
commitcfda696580a994055e4532a273ce86c867ffdac4 (patch)
treeec58b108f5444ca888732576c79e076088e931b0 /common
parenta9e0f4b2793091991dfca4fba715f7a6635e797d (diff)
downloadmpv-cfda696580a994055e4532a273ce86c867ffdac4.tar.bz2
mpv-cfda696580a994055e4532a273ce86c867ffdac4.tar.xz
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.
Diffstat (limited to 'common')
-rw-r--r--common/av_log.c8
1 files changed, 4 insertions, 4 deletions
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 <libavdevice/avdevice.h>
#endif
-#if HAVE_LIBAVRESAMPLE
+#if HAVE_IS_LIBAV
#include <libavresample/avresample.h>
#endif
-#if HAVE_LIBSWRESAMPLE
+#if HAVE_IS_FFMPEG
#include <libswresample/swresample.h>
#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
};