diff --git a/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java b/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java index f216c8f7..ff635b2b 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java @@ -18,6 +18,8 @@ public class AudioStream { public static final int RTP_PORT = 48000; public static final int RTCP_PORT = 47999; + public static final int RTP_RECV_BUFFER = 64 * 1024; + private LinkedBlockingQueue packets = new LinkedBlockingQueue(100); private DatagramSocket rtp; @@ -87,6 +89,7 @@ public class AudioStream { { rtp = new DatagramSocket(null); rtp.setReuseAddress(true); + rtp.setReceiveBufferSize(RTP_RECV_BUFFER); rtp.bind(new InetSocketAddress(RTP_PORT)); } diff --git a/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java b/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java index f15e32ee..813c453c 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java @@ -24,6 +24,7 @@ public class VideoStream { public static final int FIRST_FRAME_PORT = 47996; public static final int FIRST_FRAME_TIMEOUT = 5000; + public static final int RTP_RECV_BUFFER = 128 * 1024; private LinkedBlockingQueue packets = new LinkedBlockingQueue(100); @@ -124,6 +125,7 @@ public class VideoStream { { rtp = new DatagramSocket(null); rtp.setReuseAddress(true); + rtp.setReceiveBufferSize(RTP_RECV_BUFFER); rtp.bind(new InetSocketAddress(RTP_PORT)); }