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 19a2a1cb..f216c8f7 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/audio/AudioStream.java @@ -85,7 +85,9 @@ public class AudioStream { private void setupRtpSession() throws SocketException { - rtp = new DatagramSocket(RTP_PORT); + rtp = new DatagramSocket(null); + rtp.setReuseAddress(true); + rtp.bind(new InetSocketAddress(RTP_PORT)); } private void setupAudio() 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 0abd3bd1..c9f7b85e 100644 --- a/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java +++ b/moonlight-common/src/com/limelight/nvstream/av/video/VideoStream.java @@ -119,7 +119,9 @@ public class VideoStream { public void setupRtpSession() throws SocketException { - rtp = new DatagramSocket(RTP_PORT); + rtp = new DatagramSocket(null); + rtp.setReuseAddress(true); + rtp.bind(new InetSocketAddress(RTP_PORT)); } public void setupDecoderRenderer(VideoDecoderRenderer decRend, Object renderTarget, int drFlags) {