Module: libav
Branch: master
Commit: 5a2cb78219168af7a0f446cd97dbac2d3c1868e6

Author:    Martin Storsjö <[email protected]>
Committer: Martin Storsjö <[email protected]>
Date:      Fri Oct 12 11:10:09 2012 +0300

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

Signed-off-by: Martin Storsjö <[email protected]>

---

 libavformat/rtspdec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index d46f1a4..7e7fb2d 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);

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to