Skip to content
Snippets Groups Projects
Commit 5a2cb782 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

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

parent c80b59f6
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment