diff --git a/AUTHORS b/AUTHORS index 4818cd20d3..41f3a0f641 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,4 +17,5 @@ Anders Hasselqvist Google Inc. <*@google.com> Leandro Moreira Philo Inc. <*@philo.com> +Sergio Ammirata The Chromium Authors <*@chromium.org> diff --git a/CONTRIBUTORS b/CONTRIBUTORS index fabb1ab824..4543eca591 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -30,4 +30,5 @@ Joey Parrish Kongqun Yang Leandro Moreira Rintaro Kuroiwa +Sergio Ammirata Thomas Inskip diff --git a/packager/media/file/udp_file_posix.cc b/packager/media/file/udp_file_posix.cc index e8354e91f4..48a62ac64f 100644 --- a/packager/media/file/udp_file_posix.cc +++ b/packager/media/file/udp_file_posix.cc @@ -187,6 +187,14 @@ bool UdpFile::Open() { local_sock_addr.sin_family = AF_INET; local_sock_addr.sin_port = htons(dest_port); local_sock_addr.sin_addr.s_addr = htonl(dest_addr); + // We do not need to require exclusive bind of udp sockets + const int optval = 1; + if (setsockopt(new_socket.get(), SOL_SOCKET, SO_REUSEADDR, &optval, + sizeof(optval)) < 0) { + LOG(ERROR) + << "Could not apply the SO_REUSEADDR property to the UDP socket"; + return false; + } if (bind(new_socket.get(), reinterpret_cast(&local_sock_addr), sizeof(local_sock_addr))) {