aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2021-07-04 11:40:27 -0400
committerAndriy Gelman <andriy.gelman@gmail.com>2021-07-05 13:37:39 -0400
commit6df4bcf1d0714769af31263bf1ad2f418453f7f4 (patch)
treee5ff7f08d01b910e6cafbe7e8457f534d7d9d445 /libavformat
parentd1f78067a6f330db9aa4d598641b71e50a21d259 (diff)
downloadffmpeg-6df4bcf1d0714769af31263bf1ad2f418453f7f4.tar.gz
avformat/rtsp: Include rtcp in port range check
Currently it is only checked that the rtp port does not exceed rtp_port_max. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 492e60c71f..972cab57d7 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1500,7 +1500,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
}
/* first try in specified port range */
- while (j <= rt->rtp_port_max) {
+ while (j + 1 <= rt->rtp_port_max) {
AVDictionary *opts = map_to_opts(rt);
ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1,