gst/gstelement.c: revert recent recursive state changing commit - messing with other elements' states is evil and sho...

Original commit message from CVS:
* gst/gstelement.c: (gst_element_error_full):
revert recent recursive state changing commit - messing with other
elements' states is evil and should be done by apps only.
This commit is contained in:
Benjamin Otte 2004-03-05 22:01:42 +00:00
parent a426305315
commit e210fe6540
2 changed files with 12 additions and 15 deletions

View file

@ -1,3 +1,9 @@
2004-03-05 Benjamin Otte <otte@gnome.org>
* gst/gstelement.c: (gst_element_error_full):
revert recent recursive state changing commit - messing with other
elements' states is evil and should be done by apps only.
2004-03-05 Benjamin Otte <otte@gnome.org> 2004-03-05 Benjamin Otte <otte@gnome.org>
* gst/gstelement.c: (gst_element_get_compatible_pad_template): * gst/gstelement.c: (gst_element_get_compatible_pad_template):

View file

@ -2399,7 +2399,6 @@ gst_element_error_full
const gchar *file, const gchar *function, gint line) const gchar *file, const gchar *function, gint line)
{ {
GError *error = NULL; GError *error = NULL;
GstElement *e = NULL;
gchar *name; gchar *name;
gchar *sent_message; gchar *sent_message;
gchar *sent_debug; gchar *sent_debug;
@ -2463,22 +2462,14 @@ gst_element_error_full
gst_scheduler_error (element->sched, element); gst_scheduler_error (element->sched, element);
} }
/* recursively leave PLAYING state */ if (GST_STATE (element) == GST_STATE_PLAYING) {
e = element; GstElementStateReturn ret;
while (e)
{
if (GST_STATE (e) == GST_STATE_PLAYING) {
GstElementStateReturn ret;
ret = gst_element_set_state (e, GST_STATE_PAUSED); ret = gst_element_set_state (element, GST_STATE_PAUSED);
/* only check if this worked for current element, not parents, since if (ret != GST_STATE_SUCCESS) {
this is likely to fail anyway */ g_warning ("could not PAUSE element \"%s\" after error, help!",
if (ret != GST_STATE_SUCCESS && e == element) { GST_ELEMENT_NAME (element));
g_warning ("could not PAUSE element \"%s\" after error, help!",
GST_ELEMENT_NAME (e));
}
} }
e = GST_ELEMENT (GST_ELEMENT_PARENT (e));
} }
GST_FLAG_UNSET (element, GST_ELEMENT_IN_ERROR); GST_FLAG_UNSET (element, GST_ELEMENT_IN_ERROR);