diff options
author | Nathan Caldwell <saintdev@gmail.com> | 2011-09-27 18:48:43 -0600 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-09-30 21:33:52 +0200 |
commit | f5e717f3c735af5c941b458d42615c97028aa916 (patch) | |
tree | 711ded288c8e7dcd5f8b84e5f0ba1a0f137f11dc /avserver.c | |
parent | e81e5e8ad2bb5746df0c343c396019aca165cf66 (diff) | |
download | ffmpeg-f5e717f3c735af5c941b458d42615c97028aa916.tar.gz |
avserver: Fix a bug where the socket is IPv4, but IPv6 is autoselected for the loopback address.
This fixes bind(8080): Address family not supported by protocol.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'avserver.c')
-rw-r--r-- | avserver.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/avserver.c b/avserver.c index d0a14aa565..7b8bf1397a 100644 --- a/avserver.c +++ b/avserver.c @@ -522,6 +522,7 @@ static int socket_open_listen(struct sockaddr_in *my_addr) tmp = 1; setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp)); + my_addr->sin_family = AF_INET; if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) { char bindmsg[32]; snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port)); |