[vlc-devel] rtcp and udp port collision

Sébastien Escudier sebastien-devel at celeos.eu
Fri Oct 22 13:29:20 CEST 2010


On Fri, 2010-10-22 at 13:22 +0200, Rémi Denis-Courmont wrote:
> That makes no difference. As said, this is a fundamental race
> condition in
> bind(). You can't fix it without (non-portable) changes to the socket
> API.

I agree we can't fix the race condition where another process binds port
SRC+1.

But, in the case I describe, we know DEST is taken by the client, which
may be on the same computer, so we shouldn't bind DEST-1. This is what's
happening with me.
And to avoid this, we could bind only even ports number for SRC.
Moreover, as noticed by David, this seems to be a common practice.





More information about the vlc-devel mailing list