mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
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.
This commit is contained in:
parent
b20f57c44e
commit
88c8547b67
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-03-22 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2007-03-21 Michael Smith <msmith@fluendo.com>
|
2007-03-21 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* docs/pwg/advanced-types.xml:
|
* docs/pwg/advanced-types.xml:
|
||||||
|
|
|
@ -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 (GST_PAD_IS_SRC (pad), GST_FLOW_ERROR);
|
||||||
g_return_val_if_fail (buf != NULL, 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);
|
GST_OBJECT_LOCK (pad);
|
||||||
while (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad)))
|
while (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad)))
|
||||||
if ((ret = handle_pad_block (pad)) != GST_FLOW_OK)
|
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.",
|
g_warning ("pad %s:%s has no event handler, file a bug.",
|
||||||
GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG_PAD_NAME (pad));
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
if (need_unlock)
|
||||||
|
GST_PAD_STREAM_UNLOCK (pad);
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue