summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpbin.c
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2008-04-09 22:27:50 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:34 +0100
commit959c341cbda42c05aaa8b3bb4b1712c99205a7fc (patch)
tree2fdb332462dc17903b77651d8e85201080f8f6ef /gst/rtpmanager/gstrtpbin.c
parent3f5884708033ba3579e24b22ce3bb44657eec66f (diff)
gst/rtpmanager/: Avoid leaking pads in the RTP manager.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (free_session): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_finalize): Avoid leaking pads in the RTP manager.
Diffstat (limited to 'gst/rtpmanager/gstrtpbin.c')
-rw-r--r--gst/rtpmanager/gstrtpbin.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 4f580f48..5f781d8c 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -524,6 +524,21 @@ free_session (GstRtpBinSession * sess)
gst_element_set_state (sess->session, GST_STATE_NULL);
gst_element_set_state (sess->demux, GST_STATE_NULL);
+ if (sess->recv_rtp_sink != NULL)
+ gst_element_release_request_pad (sess->session, sess->recv_rtp_sink);
+ if (sess->recv_rtp_src != NULL)
+ gst_object_unref (sess->recv_rtp_src);
+ if (sess->recv_rtcp_sink != NULL)
+ gst_element_release_request_pad (sess->session, sess->recv_rtcp_sink);
+ if (sess->sync_src != NULL)
+ gst_object_unref (sess->sync_src);
+ if (sess->send_rtp_sink != NULL)
+ gst_element_release_request_pad (sess->session, sess->send_rtp_sink);
+ if (sess->send_rtp_src != NULL)
+ gst_object_unref (sess->send_rtp_src);
+ if (sess->send_rtcp_src != NULL)
+ gst_element_release_request_pad (sess->session, sess->send_rtcp_src);
+
gst_bin_remove (GST_BIN_CAST (bin), sess->session);
gst_bin_remove (GST_BIN_CAST (bin), sess->demux);