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.
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);