From 1362352825015b6b7aa5306cfc10ede30296153a Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 27 Aug 2013 18:24:12 +0200 Subject: [PATCH] wayland: render the raw surface if VPP failed. As a last resort, if video processing capabilities (VPP) are not available, or they did not produce anything conclusive enough, then try to fallback to the original rendering code path whereby the whole VA surface is rendered as is, no matter of video cropping or deinterlacing requests. Note: under those conditions, the visual outcome won't be correct but at least, something gets displayed instead of bailing out. --- gst-libs/gst/vaapi/gstvaapiwindow_wayland.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c index 98ee355..bfb2f10 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c @@ -463,11 +463,13 @@ gst_vaapi_window_wayland_render( if (priv->use_vpp) { GstVaapiSurface * const vpp_surface = vpp_convert(window, surface, src_rect, dst_rect, flags); - if (!vpp_surface) - return FALSE; - surface = vpp_surface; - width = window->width; - height = window->height; + if (G_UNLIKELY(!vpp_surface)) + need_vpp = FALSE; + else { + surface = vpp_surface; + width = window->width; + height = window->height; + } } GST_VAAPI_OBJECT_LOCK_DISPLAY(window); -- 2.7.4