summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormio <stigma@disroot.org>2024-09-28 15:43:09 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-09-28 19:45:26 +0900
commitdafa15cc2895d4b34f96be3f34766119a024296b (patch)
tree95374f7d9231bf702af8ab30951c7b0645dbe2f9
parentbf06d1a3e5a9c6585ece6520cb6fc2dde9b6f3e8 (diff)
downloadtdemultimedia-r14.1.x.tar.gz
tdemultimedia-r14.1.x.zip
Fix FTBFS when xinelib <= 1.2.9r14.1.3r14.1.x
Resolves: https://mirror.git.trinitydesktop.org/gitea/TDE/tdemultimedia/issues/83 Signed-off-by: mio <stigma@disroot.org> (cherry picked from commit f6b2ca587cc8163ff028f6f76bf585d09342b1c6)
-rw-r--r--xine_artsplugin/audio_fifo_out.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/xine_artsplugin/audio_fifo_out.c b/xine_artsplugin/audio_fifo_out.c
index 3087bce0..bc64277f 100644
--- a/xine_artsplugin/audio_fifo_out.c
+++ b/xine_artsplugin/audio_fifo_out.c
@@ -22,7 +22,7 @@
#include <sys/time.h>
#include <xine/audio_out.h>
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
#include <xine/xine_internal.h>
#include <xine/xine_plugin.h>
#endif
@@ -52,7 +52,7 @@ typedef struct fifo_driver_s {
int fifo_flush;
int fifo_delay;
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
config_values_t *config;
xine_t *xine;
#endif
@@ -292,7 +292,7 @@ static int ao_fifo_control( ao_driver_t *this_gen, int cmd, ... )
return 0;
}
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
static fifo_driver_t * _ao_driver = NULL;
typedef struct fifo_class_s {
@@ -354,9 +354,18 @@ static ao_driver_t * _arts_open(audio_driver_class_t *driver_class, const void *
return &_ao_driver->ao_driver;
}
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION > 2) || \
+ (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION >= 10)
+
static void *_arts_plugin_class_init(xine_t *xine, const void *data) {
+
+#else
+
+static void *_arts_plugin_class_init(xine_t *xine, void *data) {
+
+#endif
fifo_class_t *cl;
-
+
cl = (fifo_class_t *) malloc(sizeof(fifo_class_t));
if (!cl) return NULL;
cl->driver_class.open_plugin = _arts_open;
@@ -365,7 +374,7 @@ static void *_arts_plugin_class_init(xine_t *xine, const void *data) {
cl->driver_class.dispose = _arts_class_dispose;
cl->config = xine->config;
cl->xine = xine;
-
+
return cl;
}
@@ -388,7 +397,7 @@ xine_audio_port_t *init_audio_out_plugin( xine_t *xine, xine_arts_audio *audio,
xine->verbosity = 1;
#endif
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
xine_audio_port_t *ret;
xine_register_plugins(xine, arts_xine_plugin_info);
ret = xine_open_audio_driver( xine, "arts", audio );