summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsession.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-08-28 15:21:45 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:37 +0100
commit5c89bb2ab3a15eafcb59581cfc2bf5e477cafc73 (patch)
tree581d4d67cd8d16417614cc2e3f1477439daffff0 /gst/rtpmanager/rtpsession.c
parent62ecaee7488a18fb71ef012b0161a227576d1e87 (diff)
gst/rtpmanager/gstrtpsession.c: Send EOS when the session object instructs us to.
Original commit message from CVS: * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_send_rtcp), (gst_rtp_session_event_send_rtp_sink): Send EOS when the session object instructs us to. * gst/rtpmanager/rtpsession.c: (rtp_session_on_timeout): * gst/rtpmanager/rtpsession.h: Make it possible for the session manager to instruct us to send EOS. We currently will EOS when the session is a sender and when the sender part goes EOS. This is not entirely correct behaviour because the session could still participate as a receiver. Fixes #549409.
Diffstat (limited to 'gst/rtpmanager/rtpsession.c')
-rw-r--r--gst/rtpmanager/rtpsession.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
index bac851aa..947fef7e 100644
--- a/gst/rtpmanager/rtpsession.c
+++ b/gst/rtpmanager/rtpsession.c
@@ -2300,6 +2300,7 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
if (is_rtcp_time (sess, current_time, &data)) {
if (sess->source->received_bye) {
/* generate BYE instead */
+ GST_DEBUG ("generating BYE message");
session_bye (sess, &data);
sess->sent_bye = TRUE;
} else {
@@ -2367,11 +2368,14 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
/* close the RTCP packet */
gst_rtcp_buffer_end (data.rtcp);
+ GST_DEBUG ("sending packet");
if (sess->callbacks.send_rtcp)
result = sess->callbacks.send_rtcp (sess, sess->source, data.rtcp,
- sess->send_rtcp_user_data);
- else
+ sess->sent_bye, sess->send_rtcp_user_data);
+ else {
+ GST_DEBUG ("freeing packet");
gst_buffer_unref (data.rtcp);
+ }
}
return result;