From 1d0f79478f9abd5eaa70f4f08d747086be701083 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 5 Dec 2010 14:39:19 +0100 Subject: [PATCH] check: Fixup the shutting down order First bring down everything to NULL before attempting to unlink or unref anything. Avoids the tests just hanging there for ever waiting to acquire a lock that doesn't exist anymore. --- tests/check/elements/interleave.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/check/elements/interleave.c b/tests/check/elements/interleave.c index e342ece626..1497a49c98 100644 --- a/tests/check/elements/interleave.c +++ b/tests/check/elements/interleave.c @@ -218,6 +218,9 @@ GST_START_TEST (test_interleave_2ch) fail_unless (have_data == 2); + gst_element_set_state (interleave, GST_STATE_NULL); + gst_element_set_state (queue, GST_STATE_NULL); + gst_object_unref (mysrcpads[0]); gst_object_unref (mysrcpads[1]); gst_object_unref (mysinkpad); @@ -227,8 +230,6 @@ GST_START_TEST (test_interleave_2ch) gst_element_release_request_pad (interleave, sink1); gst_object_unref (sink1); - gst_element_set_state (interleave, GST_STATE_NULL); - gst_element_set_state (queue, GST_STATE_NULL); gst_object_unref (interleave); gst_object_unref (queue); gst_object_unref (bus); @@ -335,6 +336,9 @@ GST_START_TEST (test_interleave_2ch_1eos) fail_unless (have_data == 2); + gst_element_set_state (interleave, GST_STATE_NULL); + gst_element_set_state (queue, GST_STATE_NULL); + gst_object_unref (mysrcpads[0]); gst_object_unref (mysrcpads[1]); gst_object_unref (mysinkpad); @@ -344,8 +348,6 @@ GST_START_TEST (test_interleave_2ch_1eos) gst_element_release_request_pad (interleave, sink1); gst_object_unref (sink1); - gst_element_set_state (interleave, GST_STATE_NULL); - gst_element_set_state (queue, GST_STATE_NULL); gst_object_unref (interleave); gst_object_unref (queue); gst_object_unref (bus);