[FFmpeg-devel] UDP multicasts mixed up on receive due to wrong bind()

Luca Abeni lucabe72
Thu Oct 16 16:36:14 CEST 2008

Joakim Plate wrote:
> Sadly it seems winsock is quite broken for this situation.. Found this tidbit 
> on msdn.
> <quote>
> The memberships associated with a socket do not necessarily determine which 
> datagrams are received by that socket. Incoming multicast packets are accepted 
> by the kernel IP layer if any socket has claimed a membership in the 
> destination group of the datagram; however, delivery of a multicast datagram 
> to a particular socket is based on the destination port (or protocol type, for 
> raw sockets), just as with unicast datagrams. To receive multicast datagrams 
> sent to a particular port, it is necessary to bind to that local port, leaving 
> the local address unspecified (that is, INADDR_ANY). 
> </quote>

Thanks for investigating this issue. Yes, it seems that windows is quite
broken... :(

But I remember having a multicast application working on windows some years
ago (and I think it was binding the multicast group, not INADDR_ANY...).
Maybe microsoft found a way to break multicast support in recent versions ;-)
(or maybe msdn is wrong once again... My personal experience with msdn is:
never trust it)


More information about the ffmpeg-devel mailing list