rtpsession: Drops all NACKS if the list is larger remaining space
As of now, we don't only send a short set of NACK when it exceeds the packet size, but drops them all.
if (!gst_rtcp_packet_fb_set_fci_length (packet, n_nacks)) {
gst_rtcp_packet_remove (packet);
GST_WARNING ("nacks don't fit in the packet");
return;
}
Which skips the call to rtp_source_clear_nacks (source);
. So as soon as we saturate the datagram, we will never send NACK again. RTX then stops working. I haven't tested this (yet), but that is the only thing I can conclude from reading this code. We can fix this shortly, by checking the available data, and sending as much as we can and adding a new function to only remove the send nack from the list.
Though this would be at most incomplete. When nacks are register, we have a deadline to then them, which is basically now + max_delay. So to handle this cleanly and avoid sending NACK that are already considered lost, we should save the deadline with the NACK and filter out all outdated NACK in following iterations.