diff options
author | Luca Abeni <lucabe72@email.it> | 2007-10-30 08:10:45 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2007-10-30 08:10:45 +0000 |
commit | ecdcbbf66a0242ae93499824ff5aaff9f4d1bd77 (patch) | |
tree | 8a266d5e67f0fbc82dca7f42e5f9cad233cc3cd5 /libavformat | |
parent | 2a4592fedca6f133d05374545db23e663b6957f8 (diff) | |
download | ffmpeg-ecdcbbf66a0242ae93499824ff5aaff9f4d1bd77.tar.gz |
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)
Originally committed as revision 10876 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 9ef7f1f80e..0857c5d548 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -934,8 +934,8 @@ static int rtsp_read_header(AVFormatContext *s, 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; } } |