diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index b6a78ec49a..a84ab36f8f 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -1386,6 +1386,7 @@ static GstFlowReturn gst_glimage_sink_prepare (GstBaseSink * bsink, GstBuffer * buf) { GstGLImageSink *glimage_sink; + GstGLSyncMeta *sync_meta; GstBuffer **target; GstBuffer *old_input; @@ -1414,6 +1415,10 @@ gst_glimage_sink_prepare (GstBaseSink * bsink, GstBuffer * buf) if (glimage_sink->output_mode_changed) update_output_format (glimage_sink); + sync_meta = gst_buffer_get_gl_sync_meta (buf); + if (sync_meta) + gst_gl_sync_meta_wait (sync_meta, glimage_sink->context); + if (!prepare_next_buffer (glimage_sink)) { GST_GLIMAGE_SINK_UNLOCK (glimage_sink); if (old_input)