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