[FFmpeg-cvslog] rtspdec: Set the default port for listen mode, if none is specified

Martin Storsjö git at videolan.org
Sat Oct 13 14:21:35 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Oct 12 11:10:09 2012 +0300| [5a2cb78219168af7a0f446cd97dbac2d3c1868e6] | committer: Martin Storsjö

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

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a2cb78219168af7a0f446cd97dbac2d3c1868e6
---

 libavformat/rtspdec.c |    4 ++++
 1 file changed, 4 insertions(+)

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



More information about the ffmpeg-cvslog mailing list