summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott D Phillips <scott.d.phillips@intel.com>2017-04-05 11:19:15 -0700
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2017-04-11 16:32:26 +0200
commit0343649667d58dfb24d002e9cc924fd356a1dd9f (patch)
treee93bfc0922dc4f4286dd78fda6e62d2e6866228a
parentd68edb04a17ba9dd6964ec84ba7997dd4b84c6e5 (diff)
plugins: Fix usage of GST_GL_HAVE_WINDOW_* defines
When these definitions are false, they are undef in the preprocessor, not a defined value of 0. When they are unset the compile fails with: 'GST_GL_HAVE_WINDOW_WAYLAND' undeclared (first use in this function) https://bugzilla.gnome.org/show_bug.cgi?id=780948
-rw-r--r--gst/vaapi/gstvaapipluginutil.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c
index 9a12472b..78a46239 100644
--- a/gst/vaapi/gstvaapipluginutil.c
+++ b/gst/vaapi/gstvaapipluginutil.c
@@ -177,12 +177,12 @@ gst_vaapi_create_display_from_gl_context (GstObject * gl_context_object)
display_type = GST_VAAPI_DISPLAY_TYPE_WAYLAND;
#endif
} else {
-#if USE_X11
- if (!display_type && GST_GL_HAVE_WINDOW_X11)
+#if USE_X11 && GST_GL_HAVE_WINDOW_X11
+ if (!display_type)
display_type = GST_VAAPI_DISPLAY_TYPE_X11;
#endif
-#if USE_WAYLAND
- if (!display_type && GST_GL_HAVE_WINDOW_WAYLAND)
+#if USE_WAYLAND && GST_GL_HAVE_WINDOW_WAYLAND
+ if (!display_type)
display_type = GST_VAAPI_DISPLAY_TYPE_WAYLAND;
#endif
}