History

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).

Dmitry Volyntsev committed 14 years ago

Commit bc495ba1 parent ad7beb21 file · +8 −10Browse files

Unified · Split

libavformat/rtsp.c+8−10
@@ -1158,16 +1158,14 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, · 1157 unmodified lines
11581158 }
11591159
11601160 /* first try in specified port range */
1161− if (RTSP_RTP_PORT_MIN != 0) {
1162− while (j <= RTSP_RTP_PORT_MAX) {
1163− ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1,
1164− "?localport=%d", j);
1165− /* we will use two ports per rtp stream (rtp and rtcp) */
1166− j += 2;
1167− if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
1168− &s->interrupt_callback, NULL) == 0)
1169− goto rtp_opened;
1170− }
1161+ while (j <= RTSP_RTP_PORT_MAX) {
1162+ ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1,
1163+ "?localport=%d", j);
1164+ /* we will use two ports per rtp stream (rtp and rtcp) */
1165+ j += 2;
1166+ if (!ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
1167+ &s->interrupt_callback, NULL))
1168+ goto rtp_opened;
11711169 }
11721170
11731171 av_log(s, AV_LOG_ERROR, "Unable to open an input RTP port\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t