[FFmpeg-devel] Quick Patch for Multicast UDP Receive on macOS
Thilo Borgmann
thilo.borgmann at mail.de
Thu Aug 16 19:43:05 EEST 2018
Hi,
> --- /Users/mark/Downloads/udpORIG.c 2018-08-16 15:39:21.000000000 +0100
> +++ /Users/mark/Downloads/udp.c 2018-08-16 15:40:55.000000000 +0100
> @@ -828,7 +828,11 @@
> s->reuse_socket = 1;
> if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEADDR, &(s->reuse_socket), sizeof(s->reuse_socket)) != 0)
> goto fail;
> - }
> + #ifdef __APPLE__ // MacOS/X requires an additional call
> + if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEPORT, &(s->reuse_socket), sizeof(s->reuse_socket)) != 0)
> + goto fail;
> + #endif
> + }
>
> if (s->is_broadcast) {
> #ifdef SO_BROADCAST
Not sure but that might also affect other BSD derivatives like Gentoo... can you test on Linux and some BSD also?
(I've got no other BSD kind of OS other than OSX)
-Thilo
More information about the ffmpeg-devel
mailing list