From e1f9959eb51085d241f5e57fc235422126023375 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Thu, 2 Nov 2017 13:21:34 +0100 Subject: [PATCH] libs: surface: egl: add comment Add a warning comment when using old intel-vaapi-drivers (>1.8.4), where the creation of surfaces from GEM fd may fail. https://bugzilla.gnome.org/show_bug.cgi?id=773453 --- gst-libs/gst/vaapi/gstvaapisurface_egl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapisurface_egl.c b/gst-libs/gst/vaapi/gstvaapisurface_egl.c index 8bc42e536e..8ebd80186f 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface_egl.c +++ b/gst-libs/gst/vaapi/gstvaapisurface_egl.c @@ -64,6 +64,16 @@ do_create_surface_with_egl_image_unlocked (GstVaapiDisplayEGL * display, goto error_export_image_gem_buf; size = height * stride[0]; + /* + * XXX: The below surface creation may fail on Intel due to: + * https://github.com/01org/intel-vaapi-driver/issues/222 + * A permanent fix for that problem will be released in intel-vaapi-driver + * version 1.8.4 and later, and also in 1.8.3-1ubuntu1. + * However if you don't have that fix then a simple workaround is to + * uncomment this line of code: + * size = GST_ROUND_UP_32 (height) * stride[0]; + */ + return gst_vaapi_surface_new_with_gem_buf_handle (base_display, name, size, format, width, height, offset, stride);