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
This commit is contained in:
Scott D Phillips 2017-04-05 11:19:15 -07:00 committed by Víctor Manuel Jáquez Leal
parent d68edb04a1
commit 0343649667

View file

@ -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
}