summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSong Bing <b06498@freescale.com>2015-03-03 07:18:04 (GMT)
committerSebastian Dröge <sebastian@centricular.com>2015-03-11 15:51:02 (GMT)
commit1942870257747290c0d64a09e1a0d25bd296f8c6 (patch)
tree0082fd9ef09f2c10c32b6e2c479d41870ef29de1
parent7ce97c723c0d439770022167a00a02abea7a8c8c (diff)
downloadgst-plugins-base-1942870257747290c0d64a09e1a0d25bd296f8c6.tar.gz
gst-plugins-base-1942870257747290c0d64a09e1a0d25bd296f8c6.tar.xz
streamsynchronizer: Should wait state change complete before start another state change
Should wait state change complete before start another state change. Can't ensure can received async-done message when state change from PLAYING to PAUSED. https://bugzilla.gnome.org/show_bug.cgi?id=736655
-rw-r--r--tests/check/pipelines/streamsynchronizer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/check/pipelines/streamsynchronizer.c b/tests/check/pipelines/streamsynchronizer.c
index cbc3d13..59cfb7b 100644
--- a/tests/check/pipelines/streamsynchronizer.c
+++ b/tests/check/pipelines/streamsynchronizer.c
@@ -101,22 +101,22 @@ run_streamsynchronizer_handle_eos (const gchar * launch_line)
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ASYNC_DONE);
gst_message_unref (msg);
- fail_unless_equals_int (gst_element_get_state (pipeline, NULL, NULL, -1),
- GST_STATE_CHANGE_SUCCESS);
+ fail_unless_equals_int (gst_element_get_state (pipeline, NULL, NULL,
+ GST_CLOCK_TIME_NONE), GST_STATE_CHANGE_SUCCESS);
fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED) !=
GST_STATE_CHANGE_FAILURE);
- /* wait for preroll */
- msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
- GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR);
-
- fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ASYNC_DONE);
- gst_message_unref (msg);
+ /* can't ensure can received async-done message when call state change very quickly. */
+ fail_unless_equals_int (gst_element_get_state (pipeline, NULL, NULL,
+ GST_CLOCK_TIME_NONE), GST_STATE_CHANGE_SUCCESS);
fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING) !=
GST_STATE_CHANGE_FAILURE);
+ fail_unless_equals_int (gst_element_get_state (pipeline, NULL, NULL,
+ GST_CLOCK_TIME_NONE), GST_STATE_CHANGE_SUCCESS);
+
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (bus);