Allow reuse of the UDP ports to avoid conflicts with GFE

This commit is contained in:
Cameron Gutman 2013-12-11 23:33:52 -05:00
parent 4f56dce9f7
commit 7f841c1fca
2 changed files with 6 additions and 2 deletions

View File

@ -85,7 +85,9 @@ public class AudioStream {
private void setupRtpSession() throws SocketException 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() private void setupAudio()

View File

@ -119,7 +119,9 @@ public class VideoStream {
public void setupRtpSession() throws SocketException 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) { public void setupDecoderRenderer(VideoDecoderRenderer decRend, Object renderTarget, int drFlags) {