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):
check for empty intersection instead of NULL caps
(gst_element_get_compatible_pad_filtered):
const gchar *file, const gchar *function, gint line)
{
GError *error = NULL;
- GstElement *e = NULL;
gchar *name;
gchar *sent_message;
gchar *sent_debug;
gst_scheduler_error (element->sched, element);
}
- /* recursively leave PLAYING state */
- e = element;
- while (e)
- {
- if (GST_STATE (e) == 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));
- }
+ if (GST_STATE (element) == GST_STATE_PLAYING) {
+ GstElementStateReturn ret;
+
+ 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);