[farsight2/master] unref request pads after releasing them

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


---
 gst/fsrtpconference/fs-rtp-session.c        |    4 ++++
 transmitters/rawudp/fs-rawudp-transmitter.c |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index afc5071..caae59a 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -395,6 +395,7 @@ fs_rtp_session_dispose (GObject *object)
     gst_pad_set_active (self->priv->rtpbin_send_rtcp_src, FALSE);
     gst_element_release_request_pad (self->priv->conference->gstrtpbin,
       self->priv->rtpbin_send_rtcp_src);
+    gst_object_unref (self->priv->rtpbin_send_rtcp_src);
     self->priv->rtpbin_send_rtcp_src = NULL;
   }
 
@@ -1188,7 +1189,10 @@ _get_request_pad_and_link (GstElement *tee_funnel, const gchar *tee_funnel_name,
 
  error:
   if (requestpad)
+  {
     gst_element_release_request_pad (tee_funnel, requestpad);
+    gst_object_unref (requestpad);
+  }
 
   return FALSE;
 }
diff --git a/transmitters/rawudp/fs-rawudp-transmitter.c b/transmitters/rawudp/fs-rawudp-transmitter.c
index 59eb917..08fbb0a 100644
--- a/transmitters/rawudp/fs-rawudp-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-transmitter.c
@@ -684,6 +684,7 @@ fs_rawudp_transmitter_put_udpport (FsRawUdpTransmitter *trans,
   if (udpport->udpsrc_requested_pad) {
     gst_element_release_request_pad (udpport->funnel,
       udpport->udpsrc_requested_pad);
+    gst_object_unref (udpport->udpsrc_requested_pad);
   }
 
   if (udpport->udpsink) {
@@ -702,6 +703,7 @@ fs_rawudp_transmitter_put_udpport (FsRawUdpTransmitter *trans,
   if (udpport->udpsink_requested_pad) {
     gst_element_release_request_pad (udpport->tee,
       udpport->udpsink_requested_pad);
+    gst_object_unref (udpport->udpsink_requested_pad);
   }
 
   if (udpport->fd >= 0)
-- 
1.5.6.5




More information about the farsight-commits mailing list