summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier Crete <tester@tester.ca>2008-11-21 16:17:22 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-11-21 16:17:22 +0000
commita6395920c1ebaa3a8f3f0e1b002935bb48c43235 (patch)
tree75bfa21722c1efa26dce2f29a5f0ce91d50d42e3 /gst
parent5cb4a14316d4b3ae853d2b8a1f103f2229a9a0ba (diff)
downloadgst-plugins-bad-a6395920c1ebaa3a8f3f0e1b002935bb48c43235.tar.gz
gst-plugins-bad-a6395920c1ebaa3a8f3f0e1b002935bb48c43235.tar.bz2
gst-plugins-bad-a6395920c1ebaa3a8f3f0e1b002935bb48c43235.zip
gst/rtpmanager/gstrtpbin.c: Release the right pads on rtpbin. Fixes #561752.
Original commit message from CVS: Patch by: Olivier Crete <tester at tester dot ca> * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_release_pad): Release the right pads on rtpbin. Fixes #561752.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/gstrtpbin.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 11d14d51..13402ea3 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -2429,28 +2429,34 @@ gst_rtp_bin_release_pad (GstElement * element, GstPad * pad)
{
GstRtpBinSession *session;
GstRtpBin *rtpbin;
+ GstPad *target = NULL;
- g_return_if_fail (GST_IS_PAD (pad));
+ g_return_if_fail (GST_IS_GHOST_PAD (pad));
g_return_if_fail (GST_IS_RTP_BIN (element));
rtpbin = GST_RTP_BIN (element);
+ target = gst_ghost_pad_get_target (GST_GHOST_PAD (pad));
+ g_return_if_fail (target);
+
GST_RTP_BIN_LOCK (rtpbin);
- if (!(session = find_session_by_pad (rtpbin, pad)))
+ if (!(session = find_session_by_pad (rtpbin, target)))
goto unknown_pad;
- if (session->recv_rtp_sink == pad) {
+ if (session->recv_rtp_sink == target) {
remove_recv_rtp (rtpbin, session, pad);
- } else if (session->recv_rtcp_sink == pad) {
+ } else if (session->recv_rtcp_sink == target) {
remove_recv_rtcp (rtpbin, session, pad);
- } else if (session->send_rtp_sink == pad) {
+ } else if (session->send_rtp_sink == target) {
remove_send_rtp (rtpbin, session, pad);
- } else if (session->send_rtcp_src == pad) {
+ } else if (session->send_rtcp_src == target) {
remove_rtcp (rtpbin, session, pad);
}
GST_RTP_BIN_UNLOCK (rtpbin);
+ gst_object_unref (target);
+
return;
/* ERROR */