[gst-devel] Re: [gst-cvs] company gstreamer: gstreamer/gst/

David I. Lehn dlehn at vt.edu
Thu Apr 17 09:30:24 CEST 2003


* Benjamin Otte <company at users.sourceforge.net> [20030417 09:59]:
> --- gstelement.c	13 Apr 2003 03:04:26 -0000	1.194
> +++ gstelement.c	17 Apr 2003 13:52:41 -0000	1.195
> @@ -2261,15 +2261,8 @@
>        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;

Would it be useful to do both on failure?  Print out the debug info then
have a hard death?  Seems like a return val if fail call, rather than
assert, would work just as well here too.

-dave




More information about the gstreamer-devel mailing list