[FFmpeg-cvslog] avformat/rtsp: Include rtcp in port range check
Andriy Gelman
git at videolan.org
Mon Jul 5 20:44:21 EEST 2021
ffmpeg | branch: master | Andriy Gelman <andriy.gelman at gmail.com> | Sun Jul 4 11:40:27 2021 -0400| [6df4bcf1d0714769af31263bf1ad2f418453f7f4] | committer: Andriy Gelman
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 at martin.st>
Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6df4bcf1d0714769af31263bf1ad2f418453f7f4
---
libavformat/rtsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
More information about the ffmpeg-cvslog
mailing list