mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
tests: fix autodetect test not testing correctly for state change success
State change to PAUSED can be done async, so if this happens, we need to wait for the change to be done (or failed).
This commit is contained in:
parent
2a7a38ca07
commit
e9e0bebde3
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ GST_START_TEST (test_autovideosink_ghostpad_error_case)
|
|||
|
||||
/* this should fail, there's no such format */
|
||||
state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||
if (state_ret == GST_STATE_CHANGE_ASYNC) {
|
||||
/* make sure we wait for the actual success/failure to happen */
|
||||
GstState state;
|
||||
state_ret =
|
||||
gst_element_get_state (pipeline, &state, &state, GST_CLOCK_TIME_NONE);
|
||||
}
|
||||
fail_unless (state_ret == GST_STATE_CHANGE_FAILURE,
|
||||
"pipeline _set_state() to PAUSED succeeded but should have failed");
|
||||
|
||||
|
|
Loading…
Reference in a new issue