From 39da52dd6246412f686dcb7076963ae310e1822a Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sat, 6 Mar 2021 19:16:28 +0100 Subject: [PATCH] Sink: unlock widget before setting queue Let GTK handle setting queue resize/render on the widget. We are not accessing widget values at this time, so it can be unlocked. It will be locked back during the render. --- lib/gst/clapper/gtk4/gtkclapperglwidget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gst/clapper/gtk4/gtkclapperglwidget.c b/lib/gst/clapper/gtk4/gtkclapperglwidget.c index 108f555e..fc7e5feb 100644 --- a/lib/gst/clapper/gtk4/gtkclapperglwidget.c +++ b/lib/gst/clapper/gtk4/gtkclapperglwidget.c @@ -293,13 +293,15 @@ _queue_draw (GtkClapperGLWidget * clapper_widget) _apply_par (clapper_widget); + GTK_CLAPPER_GL_WIDGET_UNLOCK (clapper_widget); + gtk_widget_queue_resize (GTK_WIDGET (clapper_widget)); } else { + GTK_CLAPPER_GL_WIDGET_UNLOCK (clapper_widget); + gtk_gl_area_queue_render (GTK_GL_AREA (clapper_widget)); } - GTK_CLAPPER_GL_WIDGET_UNLOCK (clapper_widget); - return G_SOURCE_REMOVE; }