From 6b50d142f34e55aeceb5416a14ab53ff1244299c Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 29 Mar 2019 16:49:37 -0400 Subject: [PATCH] rtpsession: Fix early rtcp time comparision If the current time is equal to the early rtcp time deadline, there is no need to schedule a timer. This ensure that immediate feedback is really immediate and simplify implementing unit tests with the test clock, which stops perfectly on the timeout time. This fix has been extracted from Pexip feature patch called "rtpsession: Allow instant transmission of RTCP packets" --- gst/rtpmanager/rtpsession.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 1754d690d0..ccbaea22f9 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -3854,8 +3854,8 @@ is_rtcp_time (RTPSession * sess, GstClockTime current_time, ReportData * data) else data->is_early = FALSE; - if (data->is_early && sess->next_early_rtcp_time < current_time) { - GST_DEBUG ("early feedback %" GST_TIME_FORMAT " < now %" + if (data->is_early && sess->next_early_rtcp_time <= current_time) { + GST_DEBUG ("early feedback %" GST_TIME_FORMAT " <= now %" GST_TIME_FORMAT, GST_TIME_ARGS (sess->next_early_rtcp_time), GST_TIME_ARGS (current_time)); } else if (sess->next_rtcp_check_time == GST_CLOCK_TIME_NONE ||