diff options
author | Dmitry Volyntsev <xeioexception@gmail.com> | 2012-01-18 13:54:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-18 16:37:00 +0100 |
commit | 4259d1eb99bf74e75806e0f460a1e099cce81e2d (patch) | |
tree | 984fdfb0f705e24222ffc47dda3cce650c0acf09 /libavformat/rtsp.c | |
parent | b29ec002bbec913ffdaad3f8dc482b36525a3de3 (diff) | |
download | ffmpeg-4259d1eb99bf74e75806e0f460a1e099cce81e2d.tar.gz |
fix rtp 916 issue, patch 2
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ff1f85701b..56e5de27f8 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1161,16 +1161,14 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, } /* first try in specified port range */ - if (RTSP_RTP_PORT_MIN != 0) { - while (j <= RTSP_RTP_PORT_MAX) { - ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1, - "?localport=%d", j); - /* we will use two ports per rtp stream (rtp and rtcp) */ - j += 2; - if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, NULL) == 0) - goto rtp_opened; - } + while (j <= RTSP_RTP_PORT_MAX) { + ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1, + "?localport=%d", j); + /* we will use two ports per rtp stream (rtp and rtcp) */ + j += 2; + if (!ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL)) + goto rtp_opened; } av_log(s, AV_LOG_ERROR, "Unable to open an input RTP port\n"); err = AVERROR(EIO); |