From: Wim T. <wt...@us...> - 2002-02-06 21:12:56
|
Update of /cvsroot/gstreamer/gstreamer/gst In directory usw-pr-cvs1:/tmp/cvs-serv30914 Modified Files: gstelement.c Log Message: Small cleanups Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- gstelement.c 2002/02/06 19:05:19 1.111 +++ gstelement.c 2002/02/06 21:12:52 1.112 @@ -1022,12 +1022,13 @@ gst_element_error_func (GstElement* element, GstElement *source, gchar *errormsg) { /* tell the parent */ - if (GST_OBJECT_PARENT (element)) - { - GST_DEBUG (GST_CAT_EVENT, "forwarding error \"%s\" from %s to %s\n", errormsg, GST_ELEMENT_NAME (element), GST_OBJECT_NAME (GST_OBJECT_PARENT (element))); - gst_object_ref (element); + if (GST_OBJECT_PARENT (element)) { + GST_DEBUG (GST_CAT_EVENT, "forwarding error \"%s\" from %s to %s\n", errormsg, + GST_ELEMENT_NAME (element), GST_OBJECT_NAME (GST_OBJECT_PARENT (element))); + + gst_object_ref (GST_OBJECT (element)); g_signal_emit (G_OBJECT (GST_OBJECT_PARENT (element)), gst_element_signals[ERROR], 0, source, errormsg); - gst_object_unref (element); + gst_object_unref (GST_OBJECT (element)); } } /** @@ -1057,7 +1058,7 @@ GST_INFO (GST_CAT_EVENT, "ERROR in %s: %s", GST_ELEMENT_NAME (element), string); /* emit the signal, make sure the element stays available */ - gst_object_ref (element); + gst_object_ref (GST_OBJECT (element)); g_signal_emit (G_OBJECT (element), gst_element_signals[ERROR], 0, element, string); /* tell the scheduler */ @@ -1066,7 +1067,7 @@ } /* cleanup */ - gst_object_unref (element); + gst_object_unref (GST_OBJECT (element)); g_free (string); } |