diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-25 22:21:09 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-25 22:21:09 +0000 |
commit | 4bc5cc2313d3eee12e148dab2894b81cfc02499d (patch) | |
tree | 999593884685adf6a8487ec098c7b57d16719a4e | |
parent | 7b4a36450b10add40b0fc698e6eec89c4534dc86 (diff) | |
download | ffmpeg-4bc5cc2313d3eee12e148dab2894b81cfc02499d.tar.gz |
Reassemble the RTSP URL before replacing hostname with the numerical IP
Originally committed as revision 22681 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/rtsp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index a7ab0fd240..575ef443c0 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1505,6 +1505,12 @@ redirect: } } + /* Construct the URI used in request; this is similar to s->filename, + * but with authentication credentials removed and RTSP specific options + * stripped out. */ + ff_url_join(rt->control_uri, sizeof(rt->control_uri), "rtsp", NULL, + host, port, "%s", path); + /* open the tcp connexion */ ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL); if (url_open(&rtsp_hd, tcpname, URL_RDWR) < 0) { @@ -1520,11 +1526,6 @@ redirect: NULL, 0, NI_NUMERICHOST); } - /* Construct the URI used in request; this is similar to s->filename, - * but with authentication credentials removed and RTSP specific options - * stripped out. */ - ff_url_join(rt->control_uri, sizeof(rt->control_uri), "rtsp", NULL, - host, port, "%s", path); /* request options supported by the server; this also detects server * type */ for (rt->server_type = RTSP_SERVER_RTP;;) { |