summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2011-01-27 13:35:08 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2011-01-27 13:35:08 +0000
commit591324b9614151deefa63bd5c563cf54a2d28caf (patch)
treee3bd951bb56cfa46bfc1a5dc3d8ec7dd1d354a26
parent68615ee83ed31647908481a214c8d9fb4ebf5754 (diff)
Fix backwards compatibility with VA-API 0.31.
-rw-r--r--src/vdpau_driver.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/vdpau_driver.c b/src/vdpau_driver.c
index ade708f..6e31478 100644
--- a/src/vdpau_driver.c
+++ b/src/vdpau_driver.c
@@ -258,21 +258,7 @@ vdpau_common_Initialize(vdpau_driver_data_t *driver_data)
return VA_STATUS_SUCCESS;
}
-#if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION >= 32
-#define VA_INIT_VERSION_MAJOR 0
-#define VA_INIT_VERSION_MINOR 32
-#define VA_INIT_VERSION_MICRO 0
-#define VA_INIT_SUFFIX 0_32_0
-#define VA_INIT_GLX USE_GLX
-#include "vdpau_driver_template.h"
-
-VAStatus __vaDriverInit_0_32(void *ctx)
-{
- return vdpau_Initialize_0_32_0(ctx);
-}
-#endif
-
-#if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION == 31
+#if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION >= 31
#define VA_INIT_VERSION_MAJOR 0
#define VA_INIT_VERSION_MINOR 31
#define VA_INIT_VERSION_MICRO 0
@@ -310,7 +296,22 @@ VAStatus __vaDriverInit_0_31(void *ctx)
return vdpau_Initialize_0_31_2(ctx);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
-#else
+#endif
+
+#if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION >= 32
+#define VA_INIT_VERSION_MAJOR 0
+#define VA_INIT_VERSION_MINOR 32
+#define VA_INIT_VERSION_MICRO 0
+#define VA_INIT_SUFFIX 0_32_0
+#define VA_INIT_GLX USE_GLX
+#include "vdpau_driver_template.h"
+
+VAStatus __vaDriverInit_0_32(void *ctx)
+{
+ return vdpau_Initialize_0_32_0(ctx);
+}
+#endif
+
#define VA_INIT_VERSION_MAJOR VA_MAJOR_VERSION
#define VA_INIT_VERSION_MINOR VA_MINOR_VERSION
#define VA_INIT_VERSION_MICRO VA_MICRO_VERSION
@@ -320,6 +321,8 @@ VAStatus __vaDriverInit_0_31(void *ctx)
VAStatus VA_DRIVER_INIT_FUNC(void *ctx)
{
+#if VA_MAJOR_VERSION == 0 && VA_MINOR_VERSION == 31
+ return __vaDriverInit_0_31(ctx);
+#endif
return vdpau_Initialize_Current(ctx);
}
-#endif