From cb3a70b7f7e0338bd8d5b38c13c062cc51e6d882 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 3 Dec 2002 21:40:49 +0000 Subject: [PATCH] Do some error checking to make this test succeed Original commit message from CVS: Do some error checking to make this test succeed --- tests/old/testsuite/threads/threadd.c | 11 +++++++---- testsuite/threads/threadd.c | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/old/testsuite/threads/threadd.c b/tests/old/testsuite/threads/threadd.c index e38d266bf1..c28b4c02d7 100644 --- a/tests/old/testsuite/threads/threadd.c +++ b/tests/old/testsuite/threads/threadd.c @@ -74,10 +74,13 @@ main (gint argc, gchar *argv[]) g_print ("Setting thread to play with %d identities\n", i / RUNS_PER_IDENTITY + 1); done = FALSE; - gst_element_set_state (thread, GST_STATE_PLAYING); - - g_print ("Waiting for thread PLAYING->PAUSED\n"); - while (!done) /* do nothing */; + if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE) { + g_warning ("failed to go to PLAYING"); + } + else { + g_print ("Waiting for thread PLAYING->PAUSED\n"); + while (!done) /* do nothing */; + } running = FALSE; g_print ("Coming out of the main GStreamer loop\n"); g_signal_handler_disconnect (G_OBJECT (thread), id); diff --git a/testsuite/threads/threadd.c b/testsuite/threads/threadd.c index e38d266bf1..c28b4c02d7 100644 --- a/testsuite/threads/threadd.c +++ b/testsuite/threads/threadd.c @@ -74,10 +74,13 @@ main (gint argc, gchar *argv[]) g_print ("Setting thread to play with %d identities\n", i / RUNS_PER_IDENTITY + 1); done = FALSE; - gst_element_set_state (thread, GST_STATE_PLAYING); - - g_print ("Waiting for thread PLAYING->PAUSED\n"); - while (!done) /* do nothing */; + if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE) { + g_warning ("failed to go to PLAYING"); + } + else { + g_print ("Waiting for thread PLAYING->PAUSED\n"); + while (!done) /* do nothing */; + } running = FALSE; g_print ("Coming out of the main GStreamer loop\n"); g_signal_handler_disconnect (G_OBJECT (thread), id);