Skip to content

rtpsession: timeout conflicting addresses

Scenario: RTP stream comes from two addresses that alternate every few minutes or hours. Same SSRC, same IP, different port, e.g. 1:2:3:4:1001 and 1:2:3:4:1002.

Knowing this, we set sess->favor_new = true;

In check_collision, on the first change of port, 1:2:3:4:1001 is written to conflict table and 1:2:3:4:1002 becomes new address. When the port changes back next time, rtp_source_find_conflicting_address returns true, and Rtp session starts to drop buffers, essentially the stream ends.

timeout_conflicting_addresses is only called from session_cleanup and only if (source->internal) (not sure why). In our case, source is not internal and address stays in conflict table forever.

Solution: call timeout_conflicting_addresses when collision happens. Perhaps is not the best or correct solution, let's discuss.

Edited by Yury Shatz

Merge request reports