summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2007-12-19 20:32:30 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-12-31 00:51:09 +0000
commite384295df0ff88c41acf0f98668486aea23bf044 (patch)
tree42852b49ed471f7f0e6dfbe01ed21599f78a65c6
parent8362bb9275a051ce5ea3fa82587f0b618495af4d (diff)
fsvalve: Dont hold the object lock while calling base alloc function
-rw-r--r--plugins/elements/gstvalve.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/elements/gstvalve.c b/plugins/elements/gstvalve.c
index d057b027ac..a730ca1a74 100644
--- a/plugins/elements/gstvalve.c
+++ b/plugins/elements/gstvalve.c
@@ -273,15 +273,17 @@ gst_valve_buffer_alloc (GstPad * pad, guint64 offset, guint size,
GST_OBJECT_LOCK (GST_OBJECT (valve));
if (valve->drop)
{
+ GST_OBJECT_UNLOCK (GST_OBJECT (valve));
*buf = gst_buffer_new_and_alloc (size);
GST_BUFFER_OFFSET (*buf) = offset;
gst_buffer_set_caps (*buf, caps);
}
else
{
- ret = valve->original_allocfunc (pad, offset, size, caps, buf);
+ GstPadBufferAllocFunction allocfunc = valve->original_allocfunc;
+ GST_OBJECT_UNLOCK (GST_OBJECT (valve));
+ ret = allocfunc (pad, offset, size, caps, buf);
}
- GST_OBJECT_UNLOCK (GST_OBJECT (valve));
gst_object_unref (valve);