[farsight2/master] Remove useless get

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:21:04 PST 2008


---
 tests/check/transmitter/multicast.c |    9 ++++++---
 tests/check/transmitter/rawudp.c    |    9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/check/transmitter/multicast.c b/tests/check/transmitter/multicast.c
index 760c663..f21ee0e 100644
--- a/tests/check/transmitter/multicast.c
+++ b/tests/check/transmitter/multicast.c
@@ -55,6 +55,12 @@ GST_START_TEST (test_multicasttransmitter_new)
 
   g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);
 
+  fail_if (trans_sink == NULL, "Sink is NULL");
+  fail_if (trans_src == NULL, "Src is NULL");
+
+  gst_object_unref (trans_sink);
+  gst_object_unref (trans_src);
+
   g_object_unref (trans);
 
   gst_object_unref (pipeline);
@@ -128,7 +134,6 @@ run_multicast_transmitter_test (gint n_parameters, GParameter *params,
   GError *error = NULL;
   FsTransmitter *trans;
   FsStreamTransmitter *st;
-  GstElement *trans_sink, *trans_src;
   FsCandidate *tmpcand = NULL;
 
   loop = g_main_loop_new (NULL, FALSE);
@@ -143,8 +148,6 @@ run_multicast_transmitter_test (gint n_parameters, GParameter *params,
 
   pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler));
 
-  g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);
-
   st = fs_transmitter_new_stream_transmitter (trans, NULL, n_parameters, params,
     &error);
 
diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c
index 0d32e0e..93a3660 100644
--- a/tests/check/transmitter/rawudp.c
+++ b/tests/check/transmitter/rawudp.c
@@ -64,6 +64,12 @@ GST_START_TEST (test_rawudptransmitter_new)
 
   g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);
 
+  fail_if (trans_sink == NULL, "Sink is NULL");
+  fail_if (trans_src == NULL, "Src is NULL");
+
+  gst_object_unref (trans_sink);
+  gst_object_unref (trans_src);
+
   g_object_unref (trans);
 
   gst_object_unref (pipeline);
@@ -217,7 +223,6 @@ run_rawudp_transmitter_test (gint n_parameters, GParameter *params,
   GError *error = NULL;
   FsTransmitter *trans;
   FsStreamTransmitter *st;
-  GstElement *trans_sink, *trans_src;
 
   loop = g_main_loop_new (NULL, FALSE);
   trans = fs_transmitter_new ("rawudp", 2, &error);
@@ -231,8 +236,6 @@ run_rawudp_transmitter_test (gint n_parameters, GParameter *params,
 
   pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler));
 
-  g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);
-
   st = fs_transmitter_new_stream_transmitter (trans, NULL, n_parameters, params,
     &error);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list