mirror of https://git.ffmpeg.org/ffmpeg.git
fixed multicast connect
Originally committed as revision 1221 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
87f9c9e091
commit
772956c5d7
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue