diff options
-rw-r--r-- | audio/out/ao_lavc.c | 1 | ||||
-rw-r--r-- | compat/libav.h | 6 | ||||
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | video/out/vo_lavc.c | 1 |
4 files changed, 17 insertions, 2 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c index 08e1aa5555..c2fd2e6d63 100644 --- a/audio/out/ao_lavc.c +++ b/audio/out/ao_lavc.c @@ -26,6 +26,7 @@ #include <libavutil/common.h> #include <libavutil/audioconvert.h> +#include "compat/libav.h" #include "config.h" #include "core/options.h" #include "core/mp_common.h" diff --git a/compat/libav.h b/compat/libav.h index 54f0637749..6751fe9a39 100644 --- a/compat/libav.h +++ b/compat/libav.h @@ -27,10 +27,14 @@ #define AV_CPU_FLAG_MMX2 AV_CPU_FLAG_MMXEXT #endif -#if LIBAVUTIL_VERSION_MICRO < 100 +#if (LIBAVUTIL_VERSION_MICRO < 100) || (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 53, 100)) #define AV_CODEC_ID_SUBRIP CODEC_ID_TEXT #endif +#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 27, 0) +#define av_get_packed_sample_fmt(x) (x) +#endif + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 28, 0) #define avcodec_free_frame av_freep #endif @@ -2860,7 +2860,7 @@ echores "$_lcms2" # Test with > against Libav 0.8 versions which will NOT work rather than # specify minimum version, to allow (future) point releases to possibly work. -all_libav_libs="libavutil > 51.26.0:libavcodec > 54.00.0:libavformat > 53.20.0:libswscale >= 2.0.0" +all_libav_libs="libavutil > 51.22.0:libavcodec >= 53.35.0:libavformat > 53.20.0:libswscale >= 2.0.0" echocheck "Libav ($all_libav_libs)" if test "$ffmpeg" = auto ; then IFS=":" # shell should not be used for programming @@ -2871,6 +2871,15 @@ fi echores "yes" +echocheck "Libav 0.8 compatibility hack" +if test "$_encoding" = yes && $_pkg_config "libavcodec >= 54.0.0" ; then + echores "no" +else + _encoding=no + echores "yes" +fi + + echocheck "libpostproc >= 52.0.0" if test "$libpostproc" = auto ; then libpostproc=no diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index e502e57dd2..6a3bbddd26 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdlib.h> +#include "compat/libav.h" #include "core/mp_common.h" #include "core/options.h" #include "video/fmt-conversion.h" |