From 30267f6a64c7f81fc09f785f484580acf95a7c02 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 17 Apr 2003 13:52:41 +0000 Subject: [PATCH] It's absolute fun if you don't find this. If an element claims a successful state change but did not actually change ... Original commit message from CVS: It's absolute fun if you don't find this. If an element claims a successful state change but did not actually change its state it is broken and the program deserves to crash. And hard. Can you hear I'm annoyed? --- gst/gstelement.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gst/gstelement.c b/gst/gstelement.c index 2b138eb7f9..b0d4192391 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2261,15 +2261,8 @@ gst_element_set_state (GstElement *element, GstElementState state) case GST_STATE_SUCCESS: /* Last thing we do is verify that a successful state change really * did change the state... */ - if (GST_STATE (element) != curpending) { - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, - "element claimed state-change success," - "but state didn't change %s, %s <-> %s", - gst_element_state_get_name (GST_STATE (element)), - gst_element_state_get_name (GST_STATE_PENDING (element)), - gst_element_state_get_name (curpending)); - return GST_STATE_FAILURE; - } + /* if it did not, this is an error - fix the element that does this */ + g_assert (GST_STATE (element) == curpending); break; default: /* somebody added a GST_STATE_ and forgot to do stuff here ! */