From a19e9aea63a44751bedbd3e1b8ba35b4f242fe10 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Tue, 27 Mar 2018 13:43:01 -0600 Subject: [PATCH] ffmpeg: Enforce minimum supported versions of ffmpeg lavcodec: 54.86.100 lavformat: 54.59.106 lavutil: 52.13.100 These are the versions included in FFmpeg 1.1, which is the oldest release that works with Panda already: we've been using `av_opt_set_sample_fmt` (introduced in FFmpeg 1.1) since 03e96d8c4a903be7222365b40613429768659892 (August 2013) and nobody has complained since. In other words, I'm not dropping support for anything here, I'm just making the supported versions explicit. --- panda/src/ffmpeg/config_ffmpeg.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/panda/src/ffmpeg/config_ffmpeg.cxx b/panda/src/ffmpeg/config_ffmpeg.cxx index 8cbc9f51ec..be788eb2f8 100644 --- a/panda/src/ffmpeg/config_ffmpeg.cxx +++ b/panda/src/ffmpeg/config_ffmpeg.cxx @@ -22,12 +22,26 @@ extern "C" { #include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libavutil/avutil.h" } #if !defined(CPPPARSER) && !defined(BUILDING_FFMPEG) #error Buildsystem error: BUILDING_FFMPEG not defined #endif +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 86, 100) + #error Minimum supported version of libavcodec is 54.86.100. +#endif + +#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(54, 59, 106) + #error Minimum supported version of libavformat is 54.59.106. +#endif + +#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52, 13, 100) + #error Minimum supported version of libavutil is 52.13.100. +#endif + ConfigureDef(config_ffmpeg); NotifyCategoryDef(ffmpeg, "");