summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-08 15:15:11 +0200
committerMartin Storsjö <martin@martin.st>2012-03-09 15:03:11 +0200
commit1b89bcdd7f12602d8ae9cadc8486f7b0d70e9704 (patch)
tree64133d7cce25cb79993787f1d5a25e3a0cd00e4e /libavformat/udp.c
parent113d3e106d2ed40608b58410a518d625bac8ff15 (diff)
udp: Clarify the comment about binding the multicast address
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c4
1 files changed, 3 insertions, 1 deletions
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);
}