mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
rtpbin: only reconsider once for BYE
When iterating the sources of a BYE packet, don't signal a reconsideration for each of them but signal after we handled all sources.
This commit is contained in:
parent
e8c6bcdf8d
commit
d2ef095b80
1 changed files with 11 additions and 5 deletions
|
@ -1711,6 +1711,7 @@ rtp_session_process_bye (RTPSession * sess, GstRTCPPacket * packet,
|
||||||
{
|
{
|
||||||
guint count, i;
|
guint count, i;
|
||||||
gchar *reason;
|
gchar *reason;
|
||||||
|
gboolean reconsider = FALSE;
|
||||||
|
|
||||||
reason = gst_rtcp_packet_bye_get_reason (packet);
|
reason = gst_rtcp_packet_bye_get_reason (packet);
|
||||||
GST_DEBUG ("got BYE packet (reason: %s)", GST_STR_NULL (reason));
|
GST_DEBUG ("got BYE packet (reason: %s)", GST_STR_NULL (reason));
|
||||||
|
@ -1769,11 +1770,9 @@ rtp_session_process_bye (RTPSession * sess, GstRTCPPacket * packet,
|
||||||
|
|
||||||
sess->next_rtcp_check_time += arrival->time;
|
sess->next_rtcp_check_time += arrival->time;
|
||||||
|
|
||||||
RTP_SESSION_UNLOCK (sess);
|
/* mark pending reconsider. We only want to signal the reconsideration
|
||||||
/* notify app of reconsideration */
|
* once after we handled all the source in the bye packet */
|
||||||
if (sess->callbacks.reconsider)
|
reconsider = TRUE;
|
||||||
sess->callbacks.reconsider (sess, sess->reconsider_user_data);
|
|
||||||
RTP_SESSION_LOCK (sess);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1784,6 +1783,13 @@ rtp_session_process_bye (RTPSession * sess, GstRTCPPacket * packet,
|
||||||
|
|
||||||
g_object_unref (source);
|
g_object_unref (source);
|
||||||
}
|
}
|
||||||
|
if (reconsider) {
|
||||||
|
RTP_SESSION_UNLOCK (sess);
|
||||||
|
/* notify app of reconsideration */
|
||||||
|
if (sess->callbacks.reconsider)
|
||||||
|
sess->callbacks.reconsider (sess, sess->reconsider_user_data);
|
||||||
|
RTP_SESSION_LOCK (sess);
|
||||||
|
}
|
||||||
g_free (reason);
|
g_free (reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue