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"
This commit is contained in:
Nicolas Dufresne 2019-03-29 16:49:37 -04:00 committed by Nicolas Dufresne
parent e3c4b80750
commit 6b50d142f3

View file

@ -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 ||