diff options
author | Vineeth T M <vineeth.tm@samsung.com> | 2014-09-02 12:11:44 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-09-02 09:56:41 +0300 |
commit | 76e099e5b91bd98ad68c4461d138369351110f6a (patch) | |
tree | 277bc02e08a31e2a69dbb4fefaae935dba311c56 /gst | |
parent | f5e73d28080b1afbe5bc2c60b9a135ece45d6907 (diff) |
dataurisrc: Make get_uri() threadsafe
https://bugzilla.gnome.org/show_bug.cgi?id=735861
Diffstat (limited to 'gst')
-rw-r--r-- | gst/dataurisrc/gstdataurisrc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/dataurisrc/gstdataurisrc.c b/gst/dataurisrc/gstdataurisrc.c index ba8b9a377..1fde36d78 100644 --- a/gst/dataurisrc/gstdataurisrc.c +++ b/gst/dataurisrc/gstdataurisrc.c @@ -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 |