rtpsession: old addresses do not get removed from conflict table
We have our application working in a docker container. Docker routes incoming RTP stream to the appropriate port on our container. Our application sees these packets as coming from a random port on the host machine (e.g. 172.18.0.1:38724). It turns out that docker changes that port periodically (every 2 minutes in our experience).
In default mode, rtpsession thinks it is a different stream and starts to drop buffers every two minutes. We set it to favor-new=true, and it helps. Port changes, it works.
After a few HOURS, docker reuses the port it was using a few hours before. And then rtpsession starts to drop buffers.
The reason is - old address is still in the table of conflicting addresses.
if (rtp_source_find_conflicting_address (source,
pinfo->address, pinfo->current_time)) {
gchar *buf1;
buf1 = __g_socket_address_to_string (pinfo->address);
GST_LOG ("Known conflict on %x for %s, dropping packet", ssrc,
buf1);
g_free (buf1);
return TRUE;
It seems from rtp_source_timeout that it should have expired long ago. But I don't think this function is ever called.
Either someone needs to call rtp_source_timeout periodically, or we need a "super-favor-new" mode. Or a check for collision agd in find_conflicting_address