[farsight2/master] Improve dtmf tests a bit

Olivier Crête olivier.crete at collabora.co.uk
Mon Apr 6 17:33:55 PDT 2009


---
 tests/check/rtp/sendcodecs.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/check/rtp/sendcodecs.c b/tests/check/rtp/sendcodecs.c
index 6377aeb..f7da454 100644
--- a/tests/check/rtp/sendcodecs.c
+++ b/tests/check/rtp/sendcodecs.c
@@ -298,8 +298,6 @@ one_way (GCallback havedata_handler, gpointer data)
   cleanup_simple_conference (dat);
   gst_object_unref (recv_pipeline);
 
-  digit = 0;
-
   g_main_loop_unref (loop);
 }
 
@@ -341,10 +339,10 @@ start_stop_sending_dtmf (gpointer data)
   ret = gst_element_get_state (dat->pipeline, &state, NULL, 0);
   ts_fail_if (ret == GST_STATE_CHANGE_FAILURE);
 
-  if (state != GST_STATE_PLAYING)
+  if (ret != GST_STATE_CHANGE_SUCCESS || state != GST_STATE_PLAYING)
     return TRUE;
 
-  if(!ready_to_send)
+  if (!ready_to_send)
     return TRUE;
 
 
-- 
1.5.6.5




More information about the farsight-commits mailing list