check: lock src state to avoid error cases

Lock the state of the src element or else the pipeline might go into the error
state when we set it to PAUSED later.
This commit is contained in:
Wim Taymans 2010-11-15 18:17:36 +01:00
parent 7590cee744
commit 6c47a2e69d

View file

@ -691,6 +691,8 @@ GST_START_TEST (test_added_async2)
/* add source, don't add sink yet */
gst_bin_add (GST_BIN (pipeline), src);
/* need to lock state here or the pipeline might go in error */
gst_element_set_locked_state (src, TRUE);
ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "no SUCCESS state return");