From 6f1a5626bca9cc2bbb6822a9add94bde42caca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Tue, 15 Jun 2021 16:16:29 +0200 Subject: [PATCH] API: get MPRIS with a lock Otherwise it is not thread safe --- lib/gst/clapper/gstclapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gst/clapper/gstclapper.c b/lib/gst/clapper/gstclapper.c index c64b9379..d0fb036c 100644 --- a/lib/gst/clapper/gstclapper.c +++ b/lib/gst/clapper/gstclapper.c @@ -757,7 +757,9 @@ gst_clapper_get_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_MPRIS: + g_mutex_lock (&self->lock); g_value_set_object (value, self->mpris); + g_mutex_unlock (&self->lock); break; case PROP_STATE: g_mutex_lock (&self->lock);