From c323171dc105210f6a4d986b0a4648bbe231df3a Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 6 Jun 2014 10:35:20 +0200 Subject: [PATCH] waylandsink: remove the OBJECT_LOCK from set_caps() It's not really necessary, this method is protected from GstBaseSink with the PREROLL_LOCK --- ext/wayland/gstwaylandsink.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 1a911d643a..a75c640720 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -422,7 +422,6 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) static GstAllocationParams params = { 0, 0, 0, 15, }; sink = GST_WAYLAND_SINK (bsink); - GST_OBJECT_LOCK (sink); GST_DEBUG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps); @@ -462,34 +461,28 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) gst_object_replace ((GstObject **) & sink->pool, (GstObject *) newpool); gst_object_unref (newpool); - GST_OBJECT_UNLOCK (sink); return TRUE; invalid_format: { GST_DEBUG_OBJECT (sink, "Could not locate image format from caps %" GST_PTR_FORMAT, caps); - goto failure; + return FALSE; } unsupported_format: { GST_DEBUG_OBJECT (sink, "Format %s is not available on the display", gst_wayland_format_to_string (format)); - goto failure; + return FALSE; } pool_failed: { GST_DEBUG_OBJECT (sink, "Failed to create new pool"); - goto failure; + return FALSE; } config_failed: { GST_DEBUG_OBJECT (bsink, "failed setting config"); - goto failure; - } -failure: - { - GST_OBJECT_UNLOCK (sink); return FALSE; } }