wayland: render the raw surface if VPP failed.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 27 Aug 2013 16:24:12 +0000 (18:24 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 27 Aug 2013 16:29:45 +0000 (18:29 +0200)
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

index 98ee355..bfb2f10 100644 (file)
@@ -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);