diff options
author | Martin Storsjö <martin@martin.st> | 2012-10-12 12:10:09 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-12 19:17:24 +0400 |
commit | 5a2cb78219168af7a0f446cd97dbac2d3c1868e6 (patch) | |
tree | 654ce2c2b61868bfca7df7bd2b890782c63dba96 /libavformat | |
parent | c80b59f679a0ac861bc30f6b5469032884e42ab6 (diff) |
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); |