From 0fba387f72808c0298b3c34874d1388d8fd34def Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 11 Dec 2012 14:35:52 +0100 Subject: Fix compilation with Libav Doesn't define AVPROBE_SCORE_RETRY for some reason. They use AVPROBE_SCORE_MAX/4 directly internally. AV_DISPOSITION_ATTACHED_PIC is not defined with the most recent Libav release. AVIOContext.av_class exists in Libav, but is apparently disabled in old releases. Disable it for now until people stop torturing me with old crap releases. --- compat/libav.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compat') diff --git a/compat/libav.h b/compat/libav.h index 6751fe9a39..6546a76755 100644 --- a/compat/libav.h +++ b/compat/libav.h @@ -22,6 +22,7 @@ #include #include #include +#include #ifndef AV_CPU_FLAG_MMX2 #define AV_CPU_FLAG_MMX2 AV_CPU_FLAG_MMXEXT @@ -39,4 +40,13 @@ #define avcodec_free_frame av_freep #endif +#if LIBAVFORMAT_VERSION_MICRO < 100 +#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) +#endif + +// For Libav 0.9 +#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(54, 2, 100) +#define AV_DISPOSITION_ATTACHED_PIC 0x0400 +#endif + #endif /* MPV_LIBAV_COMPAT_H */ -- cgit v1.2.3