diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-03-22 08:23:41 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-03-22 08:23:41 +0000 |
commit | 88c8547b6765e96e6cbe9db227b08985fbfdede3 (patch) | |
tree | b74e4a1525991bfd2fd1ceaa3f537f36e7157c4c /gst/gstpad.c | |
parent | b20f57c44e4bf41629546ef44f7a6baedd4596a6 (diff) |
gst/gstpad.c: Fix possible deadlock if pad eventfunc is not specified. Fixes #421177.
Original commit message from CVS:
Patch by: <syrjala at sci dot fi>
* gst/gstpad.c: (gst_pad_alloc_buffer_full), (gst_pad_send_event):
Fix possible deadlock if pad eventfunc is not specified. Fixes #421177.
Improve debugging.
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r-- | gst/gstpad.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c index 32d4c897c..e501c421e 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2709,6 +2709,8 @@ gst_pad_alloc_buffer_full (GstPad * pad, guint64 offset, gint size, g_return_val_if_fail (GST_PAD_IS_SRC (pad), GST_FLOW_ERROR); g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR); + GST_DEBUG_OBJECT (pad, "offset %" G_GUINT64_FORMAT ", size %d", offset, size); + GST_OBJECT_LOCK (pad); while (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad))) if ((ret = handle_pad_block (pad)) != GST_FLOW_OK) @@ -4232,6 +4234,8 @@ no_function: g_warning ("pad %s:%s has no event handler, file a bug.", GST_DEBUG_PAD_NAME (pad)); GST_OBJECT_UNLOCK (pad); + if (need_unlock) + GST_PAD_STREAM_UNLOCK (pad); gst_event_unref (event); return FALSE; } |