mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
gst/gstelement.c: make reentrant (= allow removing elements in error handler)
Original commit message from CVS: * gst/gstelement.c: (gst_element_error_func): make reentrant (= allow removing elements in error handler)
This commit is contained in:
parent
6595422e32
commit
87de7f9dcc
2 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-07-08 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* gst/gstelement.c: (gst_element_error_func):
|
||||||
|
make reentrant (= allow removing elements in error handler)
|
||||||
|
|
||||||
2004-07-08 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
|
2004-07-08 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
|
||||||
|
|
||||||
* gst/gstpad.c: (gst_pad_event_default_dispatch),
|
* gst/gstpad.c: (gst_pad_event_default_dispatch),
|
||||||
|
|
|
@ -2183,20 +2183,22 @@ static void
|
||||||
gst_element_error_func (GstElement * element, GstElement * source,
|
gst_element_error_func (GstElement * element, GstElement * source,
|
||||||
GError * error, gchar * debug)
|
GError * error, gchar * debug)
|
||||||
{
|
{
|
||||||
|
GstObject *parent = GST_OBJECT_PARENT (element);
|
||||||
|
|
||||||
/* tell the parent */
|
/* tell the parent */
|
||||||
if (GST_OBJECT_PARENT (element)) {
|
if (parent) {
|
||||||
|
gst_object_ref (GST_OBJECT (element));
|
||||||
|
gst_object_ref (parent);
|
||||||
GST_CAT_DEBUG (GST_CAT_ERROR_SYSTEM,
|
GST_CAT_DEBUG (GST_CAT_ERROR_SYSTEM,
|
||||||
"forwarding error \"%s\" from %s to %s", error->message,
|
"forwarding error \"%s\" from %s to %s", error->message,
|
||||||
GST_ELEMENT_NAME (element),
|
GST_ELEMENT_NAME (element), GST_OBJECT_NAME (parent));
|
||||||
GST_OBJECT_NAME (GST_OBJECT_PARENT (element)));
|
|
||||||
|
|
||||||
gst_object_ref (GST_OBJECT (element));
|
g_signal_emit (G_OBJECT (parent),
|
||||||
g_signal_emit (G_OBJECT (GST_OBJECT_PARENT (element)),
|
|
||||||
gst_element_signals[ERROR], 0, source, error, debug);
|
gst_element_signals[ERROR], 0, source, error, debug);
|
||||||
gst_object_unref (GST_OBJECT (element));
|
|
||||||
GST_CAT_DEBUG (GST_CAT_ERROR_SYSTEM, "forwarded error \"%s\" from %s to %s",
|
GST_CAT_DEBUG (GST_CAT_ERROR_SYSTEM, "forwarded error \"%s\" from %s to %s",
|
||||||
error->message, GST_ELEMENT_NAME (element),
|
error->message, GST_ELEMENT_NAME (element), GST_OBJECT_NAME (parent));
|
||||||
GST_OBJECT_NAME (GST_OBJECT_PARENT (element)));
|
gst_object_unref (GST_OBJECT (element));
|
||||||
|
gst_object_unref (GST_OBJECT (parent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue