From 9fc682d46ff908556dcbd1ac78ed983f480976a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 14 Nov 2012 02:31:57 +0100 Subject: Improve compatibility with Libav 0.8.4 and ffmpeg 0.11.2 Libav 0.8.4 is ridiculously old (in relative terms), so I don't know how many things are broken silently. Encoding is disabled, because the required API hasn't been added yet. (On the other hand, the old API can't be used in newer versions.) This should improve compatibility with ffmpeg 0.11.2 as well, which didn't define AV_CODEC_ID_SUBRIP yet. --- compat/libav.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compat') 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 -- cgit v1.2.3