[vlc-devel] [PATCH] Fix compatibility with dav1d < 5.0x for vlc-3.x
Nicolas Chauvet
kwizart at gmail.com
Fri Mar 6 12:06:17 CET 2020
This patch is required to allow vlc-3.x to build with dav1d.
Signed-off-by: Nicolas Chauvet <kwizart at gmail.com>
---
modules/codec/dav1d.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index b692d2ad45..7bb8f38d75 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -37,6 +37,15 @@
#include <errno.h>
#include <dav1d/dav1d.h>
+// Compatibility with dav1d releases < 5.0x
+#if ! defined DAV1D_ERR
+#if EPERM > 0
+#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
+#else
+#define DAV1D_ERR(e) (e)
+#endif
+#endif
+
#include "../packetizer/iso_color_tables.h"
/****************************************************************************
--
2.24.1
More information about the vlc-devel
mailing list