From 6667408cb530d7eb7e3e4fb340a7d315782503b3 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 7 Jan 2016 14:08:39 +1100 Subject: [PATCH] glsyncmeta: only flush with a shared context The wait code will flush for us for single context pipelines. --- gst-libs/gst/gl/gstglsyncmeta.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/gstglsyncmeta.c b/gst-libs/gst/gl/gstglsyncmeta.c index a2f44a3ec2..60b1ee493a 100644 --- a/gst-libs/gst/gl/gstglsyncmeta.c +++ b/gst-libs/gst/gl/gstglsyncmeta.c @@ -50,7 +50,10 @@ _default_set_sync_gl (GstGLSyncMeta * sync_meta, GstGLContext * context) } sync_meta->data = (gpointer) gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - gl->Flush (); + + if (gst_gl_context_is_shared (context)) + /* if we only have a single context, the wait will flush for us */ + gl->Flush (); GST_LOG ("setting sync object %p", sync_meta->data); } else { gl->Finish ();