diff options
author | Martin Storsjö <martin@martin.st> | 2012-10-12 11:10:09 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-12 18:17:24 +0300 |
commit | 5a2cb78219168af7a0f446cd97dbac2d3c1868e6 (patch) | |
tree | 654ce2c2b61868bfca7df7bd2b890782c63dba96 /libavformat | |
parent | c80b59f679a0ac861bc30f6b5469032884e42ab6 (diff) | |
download | ffmpeg-5a2cb78219168af7a0f446cd97dbac2d3c1868e6.tar.gz |
rtspdec: Set the default port for listen mode, if none is specified
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtspdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index d46f1a4872..7e7fb2dcfd 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -621,6 +621,10 @@ static int rtsp_listen(AVFormatContext *s) /* ff_url_join. No authorization by now (NULL) */ ff_url_join(rt->control_uri, sizeof(rt->control_uri), "rtsp", NULL, host, port, "%s", path); + + if (port < 0) + port = RTSP_DEFAULT_PORT; + /* Create TCP connection */ ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, "?listen&listen_timeout=%d", rt->initial_timeout * 1000); |