summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager
diff options
context:
space:
mode:
authorOlivier Crête <olivier.crete@collabora.co.uk>2009-05-22 00:34:36 +0200
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:42 +0100
commit2f6e9d7bf2008ce856b1b9ca0dd37dcbbced6064 (patch)
treea756396deefa407eca82146fcb8ded3730735724 /gst/rtpmanager
parent47d4bb90c1023b02f004182e27e6f4d96f7be520 (diff)
rtpbin: Implement release of the recv rtcp pad
See #561752
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r--gst/rtpmanager/gstrtpbin.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 4db28f73..b4e61ac2 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -2176,8 +2176,18 @@ link_failed:
static void
remove_recv_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad)
{
- g_warning ("gstrtpbin: releasing pad %s:%s is not implemented",
- GST_DEBUG_PAD_NAME (pad));
+ gst_pad_set_active (pad, FALSE);
+ gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad);
+
+ if (session->sync_src) {
+ /* releasing the request pad should also unref the sync pad */
+ gst_object_unref (session->sync_src);
+ session->sync_src = NULL;
+ }
+ if (session->recv_rtcp_sink) {
+ gst_element_release_request_pad (session->session, session->recv_rtcp_sink);
+ session->recv_rtcp_sink = NULL;
+ }
}
/* Create a pad for sending RTP for the session in @name. Must be called with
@@ -2339,7 +2349,7 @@ static void
remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session, GstPad * pad)
{
gst_pad_set_active (pad, FALSE);
- gst_element_remove_pad (GST_ELEMENT (rtpbin), pad);
+ gst_element_remove_pad (GST_ELEMENT_CAST (rtpbin), pad);
if (session->send_rtcp_src) {
gst_element_release_request_pad (session->session, session->send_rtcp_src);