diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-06-06 12:10:24 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2014-06-17 13:51:28 +0200 |
commit | c17521c096a4e7c217aea6250325933c31d3e079 (patch) | |
tree | 0300fb0d6bdb6d29cf935540f9c0b62ace5539c9 /ext/wayland | |
parent | d4d46fa43a88e8812d2d26b00dc43b10d623a257 (diff) | |
download | gstreamer-plugins-bad-c17521c096a4e7c217aea6250325933c31d3e079.tar.gz |
waylandsink: protect access to properties with the OBJECT_LOCK
Diffstat (limited to 'ext/wayland')
-rw-r--r-- | ext/wayland/gstwaylandsink.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 112652bcc..e2e412cd5 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -175,7 +175,9 @@ gst_wayland_sink_get_property (GObject * object, switch (prop_id) { case PROP_DISPLAY: + GST_OBJECT_LOCK (sink); g_value_set_string (value, sink->display_name); + GST_OBJECT_UNLOCK (sink); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -191,7 +193,9 @@ gst_wayland_sink_set_property (GObject * object, switch (prop_id) { case PROP_DISPLAY: + GST_OBJECT_LOCK (sink); sink->display_name = g_value_dup_string (value); + GST_OBJECT_UNLOCK (sink); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -283,7 +287,10 @@ gst_wayland_sink_find_display (GstWaylandSink * sink) if (!sink->display) { /* if the application didn't set a display, let's create it ourselves */ + GST_OBJECT_LOCK (sink); sink->display = gst_wl_display_new (sink->display_name, &error); + GST_OBJECT_UNLOCK (sink); + if (error) { GST_ELEMENT_WARNING (sink, RESOURCE, OPEN_READ_WRITE, ("Could not initialise Wayland output"), |