summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-14 02:31:57 +0100
committerwm4 <wm4@nowhere>2012-11-14 11:45:52 +0100
commit9fc682d46ff908556dcbd1ac78ed983f480976a5 (patch)
treeb4085a2224200dea7a1009f6dbfbdd46fbd8da1d /compat
parent94fc9f75584dad8a9aaef7a441ddf946c56bb311 (diff)
downloadmpv-9fc682d46ff908556dcbd1ac78ed983f480976a5.tar.bz2
mpv-9fc682d46ff908556dcbd1ac78ed983f480976a5.tar.xz
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.
Diffstat (limited to 'compat')
-rw-r--r--compat/libav.h6
1 files changed, 5 insertions, 1 deletions
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