From 5f6c0922c097660e2b578a9c0354f4347c8aa622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 23 May 2022 15:02:25 +0200 Subject: [PATCH] plugin: Clear paintable importer in dispose Remove our ref on importer a little earlier, with a lock taken --- lib/gst/plugin/gstclapperpaintable.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/gst/plugin/gstclapperpaintable.c b/lib/gst/plugin/gstclapperpaintable.c index 289a07a4..ebd756a5 100644 --- a/lib/gst/plugin/gstclapperpaintable.c +++ b/lib/gst/plugin/gstclapperpaintable.c @@ -84,6 +84,10 @@ gst_clapper_paintable_dispose (GObject *object) GST_CLAPPER_PAINTABLE_UNLOCK (self); + GST_CLAPPER_PAINTABLE_IMPORTER_LOCK (self); + gst_clear_object (&self->importer); + GST_CLAPPER_PAINTABLE_IMPORTER_UNLOCK (self); + GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); } @@ -95,7 +99,6 @@ gst_clapper_paintable_finalize (GObject *object) GST_TRACE ("Finalize"); g_weak_ref_clear (&self->widget); - gst_clear_object (&self->importer); g_mutex_clear (&self->lock); g_mutex_clear (&self->importer_lock);