[farsight2/master] Simplify the error handling code a bit

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


---
 gst/fsrtpconference/fs-rtp-session.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 6d4149e..ab9b716 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -995,19 +995,16 @@ fs_rtp_session_constructed (GObject *object)
   ret = gst_pad_link (self->priv->rtpbin_send_rtcp_src,
     transmitter_rtcp_tee_sink_pad);
 
+  gst_object_unref (transmitter_rtcp_tee_sink_pad);
+
   if (GST_PAD_LINK_FAILED (ret))
   {
     self->priv->construction_error = g_error_new (FS_ERROR,
         FS_ERROR_CONSTRUCTION,
         "Could not link rtpbin network rtcp src to tee");
-
-    gst_object_unref (transmitter_rtcp_tee_sink_pad);
     return;
   }
 
-  gst_object_unref (transmitter_rtcp_tee_sink_pad);
-
-
   /* Now add a fakesink to the RTCP tee */
 
   tmp = g_strdup_printf ("sink_rtcp_fakesink_%u", self->id);
-- 
1.5.6.5




More information about the farsight-commits mailing list