From 639ee55df7cc1ecf7ea5dcfa7ecc5551b6b7312d Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 4 Aug 2019 09:23:45 +0800 Subject: vo_gpu: hwdec_vaapi: Synchronise after exporting VA surface This is documented as required (although we did not do it in the old GL codepath, with no visible problems) and I have seen transient artifacts after seeking which _appear_ to have gone away after introducing this. --- video/out/hwdec/hwdec_vaapi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/out') diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index 5bb5d81614..70fe9731e3 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -423,6 +423,9 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) p->esh_not_implemented = true; goto esh_failed; } + vaSyncSurface(display, va_surface_id(mapper->src)); + // No need to error out if sync fails, but good to know if it did. + CHECK_VA_STATUS(mapper, "vaSyncSurface()"); p->surface_acquired = true; #if HAVE_GL -- cgit v1.2.3