rtspsrc and rtsp-server allocate two udp ports for rtp, the even for rtp,  the odd for rtcp.<div>The allocation in gstreamer works well for only one stream, but fails for more than two streams when the first auto allocated port is odd.</div>

<div><br></div><div>We assume the first auto allocated port is 5001.</div><div>For the first stream, we will try 5002 and get 5002/5003 for rtp/rtcp successfully.</div><div>For the second stream, we get auto allocated port 5001 again!!</div>

<div>Then we will try 5002 for rtp again.</div><div>Finally, we get 5002/5003 for rtp/rtcp of the second stream successfully again, which are the same as the fisrt stream.</div><div>This will make rtp not working.</div><div>

<br></div><div>We can allocate the same ports for both stream, because the udpsrc using SO_REUSEADDR.</div><div>Is there any good reason for using SO_REUSEADDR in udpsrc? </div><div>We can avoid the problem by setting SO_REUSEADDR to 0.</div>

<div>Or.. is there any other way to solve this problem?</div><div><br></div><div>Thanks.</div>