summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crête <olivier.crete@collabora.co.uk>2009-05-22 00:51:53 +0200
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:42 +0100
commit46388b767fd7d8ef73da52999990ff1d722de28e (patch)
tree9583572ec0ad08044993c556f74cfe26a450fe02
parent35090984687ddbe0d2a6fb39838b895a7e3d5c11 (diff)
rtpbin: Implement relasing of the rtp recv pad
-rw-r--r--gst/rtpmanager/gstrtpbin.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index a1411e10c..075776ee4 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -2081,8 +2081,23 @@ link_failed:
static void
remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad)
{
- g_warning ("gstrtpbin: releasing pad %s:%s is not implemented",
- GST_DEBUG_PAD_NAME (pad));
+ if (session->demux_newpad_sig) {
+ g_signal_handler_disconnect (session->demux, session->demux_newpad_sig);
+ session->demux_newpad_sig = 0;
+ }
+
+ if (session->recv_rtp_src) {
+ gst_object_unref (session->recv_rtp_src);
+ session->recv_rtp_src = NULL;
+ }
+
+ if (session->recv_rtp_sink) {
+ gst_element_release_request_pad (session->session, session->recv_rtp_sink);
+ session->recv_rtp_sink = NULL;
+ }
+
+ gst_pad_set_active (pad, FALSE);
+ gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad);
}
/* Create a pad for receiving RTCP for the session in @name. Must be called with