]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtspdec.c
lavf: Add functions for SRTP decryption/encryption
[ffmpeg] / libavformat / rtspdec.c
index d46f1a4872e638be3d8db9606e8f6524748bc28b..7e7fb2dcfdbdfd51df8f6315e91bc622b2222ddd 100644 (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);