mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
adder: Perform get_state() in the unit test
Wait for the alsasrc to return to NULL after setting it to PAUSED for testing, otherwise it leads to segfaults later on.
This commit is contained in:
parent
b26eae25d0
commit
7753d46350
1 changed files with 2 additions and 0 deletions
|
@ -443,6 +443,7 @@ GST_START_TEST (test_live_seeking)
|
||||||
/* Test that the audio source can get to paused, else skip */
|
/* Test that the audio source can get to paused, else skip */
|
||||||
res = gst_element_set_state (src1, GST_STATE_PAUSED);
|
res = gst_element_set_state (src1, GST_STATE_PAUSED);
|
||||||
(void) gst_element_set_state (src1, GST_STATE_NULL);
|
(void) gst_element_set_state (src1, GST_STATE_NULL);
|
||||||
|
(void) gst_element_get_state (src1, NULL, NULL, GST_CLOCK_TIME_NONE);
|
||||||
if (res == GST_STATE_CHANGE_FAILURE) {
|
if (res == GST_STATE_CHANGE_FAILURE) {
|
||||||
gst_object_unref (src1);
|
gst_object_unref (src1);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -521,6 +522,7 @@ GST_START_TEST (test_live_seeking)
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
cleanup:
|
cleanup:
|
||||||
|
GST_INFO ("cleaning up");
|
||||||
if (main_loop)
|
if (main_loop)
|
||||||
g_main_loop_unref (main_loop);
|
g_main_loop_unref (main_loop);
|
||||||
if (play_seek_event)
|
if (play_seek_event)
|
||||||
|
|
Loading…
Reference in a new issue