Mercurial > libavformat.hg
changeset 2684:3dd4b622f4e3 libavformat
If local port n is not available, try n + 2 instead of continuing to bind
on n (allow to receive 2 rtsp streams simultaneously with libavformat)
author | lucabe |
---|---|
date | Tue, 30 Oct 2007 08:10:45 +0000 |
parents | 153d6efc05b8 |
children | 1774032af3e6 |
files | rtsp.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Tue Oct 30 00:01:25 2007 +0000 +++ b/rtsp.c Tue Oct 30 08:10:45 2007 +0000 @@ -934,8 +934,8 @@ if (RTSP_RTP_PORT_MIN != 0) { while(j <= RTSP_RTP_PORT_MAX) { snprintf(buf, sizeof(buf), "rtp://?localport=%d", j); + j += 2; /* we will use two port by rtp stream (rtp and rtcp) */ if (url_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0) { - j += 2; /* we will use two port by rtp stream (rtp and rtcp) */ goto rtp_opened; } }