summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-15 18:37:51 +0200
committerwm4 <wm4@nowhere>2016-05-15 18:37:51 +0200
commit32c10956e0a2dbf920026ee549f84a7581e11d21 (patch)
treeae5039df58ffcb77065a2ffbf41ede1a091471d1
parent6ae7a555bfd0dde6967d716b4439f1c47911b5d4 (diff)
downloadmpv-32c10956e0a2dbf920026ee549f84a7581e11d21.tar.bz2
mpv-32c10956e0a2dbf920026ee549f84a7581e11d21.tar.xz
vaapi: avoid forward declaration of variable
Why is everything so horrible.
-rw-r--r--video/decode/vaapi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c
index d108d50a8b..aa8291da79 100644
--- a/video/decode/vaapi.c
+++ b/video/decode/vaapi.c
@@ -72,15 +72,6 @@ struct va_native_display {
void (*destroy)(struct priv *p);
};
-static const struct va_native_display disp_x11;
-
-static const struct va_native_display *const native_displays[] = {
-#if HAVE_VAAPI_X11
- &disp_x11,
-#endif
- NULL
-};
-
#if HAVE_VAAPI_X11
#include <X11/Xlib.h>
#include <va/va_x11.h>
@@ -108,6 +99,13 @@ static const struct va_native_display disp_x11 = {
};
#endif
+static const struct va_native_display *const native_displays[] = {
+#if HAVE_VAAPI_X11
+ &disp_x11,
+#endif
+ NULL
+};
+
#define HAS_HEVC VA_CHECK_VERSION(0, 38, 0)
#define HAS_VP9 (VA_CHECK_VERSION(0, 38, 1) && defined(FF_PROFILE_VP9_0))