From 1b89bcdd7f12602d8ae9cadc8486f7b0d70e9704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 8 Mar 2012 15:15:11 +0200 Subject: [PATCH] udp: Clarify the comment about binding the multicast address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/udp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index 12de48cc4e..e91b95cde4 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -380,7 +380,9 @@ static int udp_open(URLContext *h, const char *uri, int flags) goto fail; } - /* if multicast, try the multicast address bind first */ + /* If multicast, try binding the multicast address first, to avoid + * receiving UDP packets from other sources aimed at the same UDP + * port. This fails on windows. */ if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) { bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len); }