Commit cb9256e6 authored by ramiro's avatar ramiro

Set UDP receive buffer to 64k

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10129 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1a2eacef
...@@ -43,6 +43,7 @@ typedef struct { ...@@ -43,6 +43,7 @@ typedef struct {
} UDPContext; } UDPContext;
#define UDP_TX_BUF_SIZE 32768 #define UDP_TX_BUF_SIZE 32768
#define UDP_MAX_PKT_SIZE 65536
#ifdef CONFIG_IPV6 #ifdef CONFIG_IPV6
...@@ -396,6 +397,11 @@ static int udp_open(URLContext *h, const char *uri, int flags) ...@@ -396,6 +397,11 @@ static int udp_open(URLContext *h, const char *uri, int flags)
perror("setsockopt sndbuf"); perror("setsockopt sndbuf");
goto fail; goto fail;
} }
} else {
/* set udp recv buffer size to the largest possible udp packet size to
* avoid losing data on OSes that set this too low by default. */
tmp = UDP_MAX_PKT_SIZE;
setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp));
} }
s->udp_fd = udp_fd; s->udp_fd = udp_fd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment