summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-17 00:09:18 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-17 00:25:50 +0100
commit1d35549d6070b3aae5dd079831c82c6b4777bead (patch)
treee057dd1d2ad09cb9f59bf55c596929276d0bd1a6
parent2bed61ee2ff5f1bb7c8ce068ae3dd992e074ffea (diff)
tests: fix state change order in aiffparse test
Do state changes from sink to src. Fixes race condition in pull mode test where the source will start up and push buffers to queue/identity or aiffparse before the main thread has managed to set them to playing yet.
-rw-r--r--tests/check/elements/aiffparse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/check/elements/aiffparse.c b/tests/check/elements/aiffparse.c
index 2d88e4925..9d61a9982 100644
--- a/tests/check/elements/aiffparse.c
+++ b/tests/check/elements/aiffparse.c
@@ -194,11 +194,11 @@ run_check (gboolean push_mode)
GST_INFO ("Setting to PLAYING");
gst_pad_set_active (sinkpad, TRUE);
- fail_unless (gst_element_set_state (src,
+ fail_unless (gst_element_set_state (aiffparse,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
fail_unless (gst_element_set_state (sep,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
- fail_unless (gst_element_set_state (aiffparse,
+ fail_unless (gst_element_set_state (src,
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
g_main_loop_run (loop);
@@ -206,10 +206,10 @@ run_check (gboolean push_mode)
fail_unless (data_read == SSND_DATA_SIZE);
fail_unless (push_mode || (have_tags == TRUE));
- gst_element_set_state (src, GST_STATE_NULL);
- gst_element_set_state (sep, GST_STATE_NULL);
- gst_element_set_state (aiffparse, GST_STATE_NULL);
gst_pad_set_active (sinkpad, FALSE);
+ gst_element_set_state (aiffparse, GST_STATE_NULL);
+ gst_element_set_state (sep, GST_STATE_NULL);
+ gst_element_set_state (src, GST_STATE_NULL);
gst_object_unref (aiffparse);
gst_object_unref (src);