summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-08 23:38:35 +0100
committerwm4 <wm4@nowhere>2013-12-08 23:51:39 +0100
commit398bfbe4c15e0459b0d13eea78e913ea75402c92 (patch)
tree3596f44d4eb4abfcbf966a1db0eea80b589223d1 /compat
parent04faf9a1cbeabcf5949cbc85ed73e1ac82d4837f (diff)
downloadmpv-398bfbe4c15e0459b0d13eea78e913ea75402c92.tar.bz2
mpv-398bfbe4c15e0459b0d13eea78e913ea75402c92.tar.xz
compat: add compatibility kludge for Libav 9
Libav 9 still uses the unprefixed PIX_FMT_... symbols, but they will probably be removed some time in the future. There are some other deprecations we have yet to take care of, but there are no clear replacements yet.
Diffstat (limited to 'compat')
-rw-r--r--compat/libav.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/compat/libav.h b/compat/libav.h
index ba5250b5f3..56876c1336 100644
--- a/compat/libav.h
+++ b/compat/libav.h
@@ -28,4 +28,16 @@
#define AV_CPU_FLAG_MMX2 AV_CPU_FLAG_MMXEXT
#endif
+// At least Libav 9 doesn't define the new symbols
+#ifndef AV_PIX_FMT_FLAG_BE
+#define AV_PIX_FMT_FLAG_BE PIX_FMT_BE
+#define AV_PIX_FMT_FLAG_PAL PIX_FMT_PAL
+#define AV_PIX_FMT_FLAG_BITSTREAM PIX_FMT_BITSTREAM
+#define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL
+#define AV_PIX_FMT_FLAG_PLANAR PIX_FMT_PLANAR
+#define AV_PIX_FMT_FLAG_RGB PIX_FMT_RGB
+#define AV_PIX_FMT_FLAG_PSEUDOPAL PIX_FMT_PSEUDOPAL
+#define AV_PIX_FMT_FLAG_ALPHA PIX_FMT_ALPHA
+#endif
+
#endif /* MPV_LIBAV_COMPAT_H */