Le 2015-05-15 17:18, Luca Barbato a écrit :
Make it as large as 5 times the expected maximum udp packet.

Increasing the buffer size may be a good idea on Windows. But setting a buffer size is usually a bad idea on Linux in my experience (the kernel knows better).

In any case, PACKET size over 65535 bytes makes absolutely no sense. It is not possible at the protocol level (unless jumbo grams maybe but nobody uses that for multimedia if at all).

---
 libavformat/udp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index dfc3b5a..d7b5eb10 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -58,8 +58,8 @@ typedef struct UDPContext {
     char *block;
 } UDPContext;

-#define UDP_TX_BUF_SIZE 32768
-#define UDP_MAX_PKT_SIZE 65536
+#define UDP_TX_BUF_SIZE 32768 * 5
+#define UDP_MAX_PKT_SIZE 65536 * 5

 #define OFFSET(x) offsetof(UDPContext, x)
 #define D AV_OPT_FLAG_DECODING_PARAM

--
Rémi Denis-Courmont
Remlab T:mi
http://www.remlab.net/
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to