aboutsummaryrefslogtreecommitdiffstats
path: root/libav
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-11-18 17:16:16 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-11-18 17:16:16 +0000
commit772956c5d7029898faf3a20f90bc9d2329868fd8 (patch)
treec5fd0d957de5a96d6012c06e2e52571e1aa92c1c /libav
parent87f9c9e0915adabcb7db6489019f1d0fe4582394 (diff)
downloadffmpeg-772956c5d7029898faf3a20f90bc9d2329868fd8.tar.gz
fixed multicast connect
Originally committed as revision 1221 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav')
-rw-r--r--libav/udp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libav/udp.c b/libav/udp.c
index 8df93a8a8a..3d159ef4f8 100644
--- a/libav/udp.c
+++ b/libav/udp.c
@@ -141,13 +141,13 @@ static int udp_open(URLContext *h, const char *uri, int flags)
if (udp_fd < 0)
goto fail;
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_addr.s_addr = htonl (INADDR_ANY);
if (s->is_multicast && !(h->flags & URL_WRONLY)) {
- /* special case: the bind must be done on the multicast address */
- my_addr = s->dest_addr;
+ /* special case: the bind must be done on the multicast address port */
+ my_addr.sin_port = s->dest_addr.sin_port;
} else {
- my_addr.sin_family = AF_INET;
my_addr.sin_port = htons(s->local_port);
- my_addr.sin_addr.s_addr = htonl (INADDR_ANY);
}
/* the bind is needed to give a port to the socket now */