Commit bc495bad authored by Dmitry Volyntsev's avatar Dmitry Volyntsev Committed by Martin Storsjö

rtsp: Remove a leftover, currently pointless check

This check isn't relevant in the way the code currently works.

Also change a case of if (x == 0) into if (!x).
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent ad7beb2c
...@@ -1158,16 +1158,14 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, ...@@ -1158,16 +1158,14 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
} }
/* first try in specified port range */ /* first try in specified port range */
if (RTSP_RTP_PORT_MIN != 0) { while (j <= RTSP_RTP_PORT_MAX) {
while (j <= RTSP_RTP_PORT_MAX) { ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1,
ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1, "?localport=%d", j);
"?localport=%d", j); /* we will use two ports per rtp stream (rtp and rtcp) */
/* we will use two ports per rtp stream (rtp and rtcp) */ j += 2;
j += 2; if (!ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE, &s->interrupt_callback, NULL))
&s->interrupt_callback, NULL) == 0) goto rtp_opened;
goto rtp_opened;
}
} }
av_log(s, AV_LOG_ERROR, "Unable to open an input RTP port\n"); av_log(s, AV_LOG_ERROR, "Unable to open an input RTP port\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment