gst: Fix synchronization
authorMatthias Clasen <mclasen@redhat.com>
Mon, 30 Jan 2023 16:56:50 +0000 (11:56 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 30 Jan 2023 17:04:49 +0000 (12:04 -0500)
It does not make sense to sync and wait in the
same context, that is just a no-op. The intention
of this code clearly was to sync in the gst
context, and wait in the gdk one.

That also matches what the gtk sink implementation
in gstreamer does.

modules/media/gtkgstsink.c

index 3c41af73f3e6be13259d60db3b028eda2acf10c3..f9db6f6136c45e3c8892808fe0cdf25b55bbe283 100644 (file)
@@ -292,7 +292,7 @@ gtk_gst_sink_texture_from_buffer (GtkGstSink *self,
       sync_meta = gst_buffer_get_gl_sync_meta (buffer);
       if (sync_meta) {
         gst_gl_sync_meta_set_sync_point (sync_meta, self->gst_context);
-        gst_gl_sync_meta_wait (sync_meta, self->gst_context);
+        gst_gl_sync_meta_wait (sync_meta, self->gst_app_context);
       }
 
       texture = gdk_gl_texture_new (self->gdk_context,