dataurisrc: Make get_uri() threadsafe

https://bugzilla.gnome.org/show_bug.cgi?id=735861
This commit is contained in:
Vineeth T M 2014-09-02 12:11:44 +05:30 committed by Sebastian Dröge
parent f5e73d2808
commit 76e099e5b9

View file

@ -302,9 +302,12 @@ static gchar *
gst_data_uri_src_get_uri (GstURIHandler * handler)
{
GstDataURISrc *src = GST_DATA_URI_SRC (handler);
gchar *src_uri = NULL;
/* FIXME: make thread-safe */
return g_strdup (src->uri);
GST_OBJECT_LOCK (src);
src_uri = g_strdup (src->uri);
GST_OBJECT_UNLOCK (src);
return src_uri;
}
static gboolean