summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-08 00:38:02 +0200
committerMartin Storsjö <martin@martin.st>2012-03-09 15:03:10 +0200
commit113d3e106d2ed40608b58410a518d625bac8ff15 (patch)
tree7189b7cf022f2bf75e499d2fb756f93b7ff45e1d /libavformat/udp.c
parentea1d64ab1066145ba919b79a2080f3091d562217 (diff)
udp: Reorder comments
When this code was added in 36b532815cb83, the new code was added between the existing comment and the existing line of code, making the old comment seem to refer to the new code. This makes it read correctly. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 93d2692a39..12de48cc4e 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -380,13 +380,13 @@ static int udp_open(URLContext *h, const char *uri, int flags)
goto fail;
}
- /* the bind is needed to give a port to the socket now */
/* if multicast, try the multicast address bind first */
if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) {
bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);
}
/* bind to the local address if not multicast or if the multicast
* bind failed */
+ /* the bind is needed to give a port to the socket now */
if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0) {
av_log(h, AV_LOG_ERROR, "bind failed: %s\n", strerror(errno));
goto fail;