SharpRTSP icon indicating copy to clipboard operation
SharpRTSP copied to clipboard

Android Port Conflict (.NET issue)

Open belveder79 opened this issue 3 years ago • 0 comments

I just tried using the library on an Android device, and I realized that the SocketException is not thrown even if the UDP port is already used:

https://github.com/ngraziano/SharpRTSP/blob/a42acb1d27ebebb3e08b6739acbc8e3f5942709d/RTSP/UdpSocket.cs#L47

Don't ask me why... I did not find any reference or similar issue anywhere. I just worked around it by specifying two different port ranges for audio and video here (respectively offsetting the audio port range by two from 50000 to 50002 works also):

https://github.com/ngraziano/SharpRTSP/blob/a42acb1d27ebebb3e08b6739acbc8e3f5942709d/RtspClientExample/RTSPClient.cs#L174

belveder79 avatar May 05 '22 19:05 belveder79