Browse Source

rtspdec: Set the default port for listen mode, if none is specified

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n1.1
Martin Storsjö 13 years ago
parent
commit
5a2cb78219
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/rtspdec.c

+ 4
- 0
libavformat/rtspdec.c View File

@@ -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);


Loading…
Cancel
Save