[vlc-commits] udp: don't set receive/send buffers for socket
Ilkka Ollakka
git at videolan.org
Wed Nov 20 16:37:07 CET 2013
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Nov 20 17:24:35 2013 +0200| [1fb1731824e8abebe37bd8d9665724c69d0f5aee] | committer: Ilkka Ollakka
udp: don't set receive/send buffers for socket
Current OS should be able to set those buffers to be reasonable, and
this buffer size caused drops with HD udp/ts inputs.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1fb1731824e8abebe37bd8d9665724c69d0f5aee
---
src/network/udp.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/src/network/udp.c b/src/network/udp.c
index 9f281b6..2890d59 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -95,15 +95,6 @@ static int net_SetupDgramSocket (vlc_object_t *p_obj, int fd,
setsockopt (fd, SOL_SOCKET, SO_REUSEPORT, &(int){ 1 }, sizeof (int));
#endif
-#ifdef SO_RCVBUF
- /* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s)
- * to avoid packet loss caused in case of scheduling hiccups */
- setsockopt (fd, SOL_SOCKET, SO_RCVBUF,
- (void *)&(int){ 0x80000 }, sizeof (int));
- setsockopt (fd, SOL_SOCKET, SO_SNDBUF,
- (void *)&(int){ 0x80000 }, sizeof (int));
-#endif
-
#if defined (_WIN32)
if (net_SockAddrIsMulticast (ptr->ai_addr, ptr->ai_addrlen)
&& (sizeof (struct sockaddr_storage) >= ptr->ai_addrlen))
@@ -528,11 +519,6 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
if (fd == -1)
continue;
- /* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s)
- * to avoid packet loss caused by scheduling problems */
- setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &(int){ 0x80000 }, sizeof (int));
- setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &(int){ 0x80000 }, sizeof (int));
-
/* Allow broadcast sending */
setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &(int){ 1 }, sizeof (int));
More information about the vlc-commits
mailing list