mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtpsession: Fix EOS forwarding
So far we assumed that if all sources are bye, this meant we needed to send an EOS on the RTCP sink. The problem is that this case may happens if we only had one internal source and it detected a collision. So now we limit the EOS forwarding to when there is a send_rtp_sink pad and that this pad has received EOS. We don'tcheck the recv_rtp_sink since the code does not wait for the bye to be send before sending EOS to the RTCP src pad.
This commit is contained in:
parent
098f936be8
commit
e72ef633a6
1 changed files with 6 additions and 3 deletions
|
@ -1421,7 +1421,7 @@ do_rtcp_events (GstRtpSession * rtpsession, GstPad * srcpad)
|
||||||
* well. */
|
* well. */
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
|
gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
|
||||||
GstBuffer * buffer, gboolean eos, gpointer user_data)
|
GstBuffer * buffer, gboolean all_sources_bye, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
GstRtpSession *rtpsession;
|
GstRtpSession *rtpsession;
|
||||||
|
@ -1444,8 +1444,11 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
|
||||||
GST_LOG_OBJECT (rtpsession, "sending RTCP");
|
GST_LOG_OBJECT (rtpsession, "sending RTCP");
|
||||||
result = gst_pad_push (rtcp_src, buffer);
|
result = gst_pad_push (rtcp_src, buffer);
|
||||||
|
|
||||||
/* we have to send EOS after this packet */
|
/* Forward send an EOS on the RTCP sink if we received an EOS on the
|
||||||
if (eos) {
|
* send_rtp_sink. We don't need to check the recv_rtp_sink since in this
|
||||||
|
* case the EOS event would already have been sent */
|
||||||
|
if (all_sources_bye && rtpsession->send_rtp_sink &&
|
||||||
|
GST_PAD_IS_EOS (rtpsession->send_rtp_sink)) {
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
|
||||||
GST_LOG_OBJECT (rtpsession, "sending EOS");
|
GST_LOG_OBJECT (rtpsession, "sending EOS");
|
||||||
|
|
Loading…
Reference in a new issue