vaapidecode: texture upload if driver supports GL
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 25 Oct 2016 15:48:47 +0000 (17:48 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Fri, 3 Mar 2017 19:01:09 +0000 (20:01 +0100)
When the allowed source pad caps are generated, the GLTextureUpload caps are
only inserted if the driver support OpenGL.

https://bugzilla.gnome.org/show_bug.cgi?id=772838

gst/vaapi/gstvaapidecode.c

index b279b83..407e25b 100644 (file)
@@ -219,7 +219,8 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode)
     return FALSE;
   }
 #if (USE_GLX || USE_EGL)
-  if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)) {
+  if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode) &&
+      gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))) {
     out_caps = gst_caps_make_writable (out_caps);
     gst_caps_append (out_caps,
         gst_caps_from_string (GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS));