Commit 7e7e52ca authored by Olivier Crête's avatar Olivier Crête

rtpsession: Only send EOS if all sources have been marked bye

Now that multiple sender RTPSource can share the same RTPSession, we
must not send an EOS unless they're all marked bye.
parent 0444342c
......@@ -3950,6 +3950,21 @@ update_generation (const gchar * key, RTPSource * source, ReportData * data)
}
}
static gboolean
rtp_session_are_all_sources_bye (RTPSession * sess)
{
GHashTableIter iter;
RTPSource *src;
g_hash_table_iter_init (&iter, sess->ssrcs[sess->mask_idx]);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) & src)) {
if (!src->marked_bye)
return FALSE;
}
return TRUE;
}
/**
* rtp_session_on_timeout:
* @sess: an #RTPSession
......@@ -4106,8 +4121,8 @@ done:
GST_DEBUG ("%p, sending RTCP packet, avg size %u, %u", &sess->stats,
sess->stats.avg_rtcp_packet_size, packet_size);
result =
sess->callbacks.send_rtcp (sess, source, buffer, output->is_bye,
sess->send_rtcp_user_data);
sess->callbacks.send_rtcp (sess, source, buffer,
rtp_session_are_all_sources_bye (sess), sess->send_rtcp_user_data);
RTP_SESSION_LOCK (sess);
sess->stats.nacks_sent += data.nacked_seqnums;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment