API: get MPRIS with a lock

Otherwise it is not thread safe
This commit is contained in:
Rafał Dzięgiel
2021-06-15 16:16:29 +02:00
parent fbe6a8804c
commit 6f1a5626bc

View File

@@ -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);