player: Don't set subtitle URI directly but dispatch to the player thread

Otherwise we do state changes and everything in the application thread, which
might block and more important can cause reentrant signals.

https://bugzilla.gnome.org/show_bug.cgi?id=766607
This commit is contained in:
Sebastian Dröge 2016-05-25 09:53:15 +03:00
parent b730f7e89d
commit 3af9fd7322

View file

@ -3506,12 +3506,7 @@ gst_player_set_subtitle_uri (GstPlayer * self, const gchar * suburi)
{
g_return_val_if_fail (GST_IS_PLAYER (self), FALSE);
g_mutex_lock (&self->lock);
g_free (self->suburi);
self->suburi = g_strdup (suburi);
g_mutex_unlock (&self->lock);
gst_player_set_suburi_internal (self);
g_object_set (self, "suburi", suburi, NULL);
return TRUE;
}