diff options
author | Martin Storsjö <martin@martin.st> | 2010-03-05 22:35:21 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-03-05 22:35:21 +0000 |
commit | 57b5555c91a9792e3ac99102b3d1a5c44b45fdd9 (patch) | |
tree | e9b6fa60b663ea3dbbf3bebc1c0c2943246293c4 /libavformat/gopher.c | |
parent | 780d7897a9c9295b43f1f0e9b49a11f99cd402c3 (diff) | |
download | ffmpeg-57b5555c91a9792e3ac99102b3d1a5c44b45fdd9.tar.gz |
Use ff_url_join for assembling URLs, instead of snprintf
This ensures proper escaping of numerical IPv6 addresses.
The RTSP (de)muxer needs its own network initialization, since it isn't
a protocol and url_open hasn't been called yet.
Originally committed as revision 22226 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gopher.c')
-rw-r--r-- | libavformat/gopher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/gopher.c b/libavformat/gopher.c index abd1cc394a..396b358cb1 100644 --- a/libavformat/gopher.c +++ b/libavformat/gopher.c @@ -95,7 +95,7 @@ static int gopher_open(URLContext *h, const char *uri, int flags) if (port < 0) port = 70; - snprintf(buf, sizeof(buf), "tcp://%s:%d", hostname, port); + ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); s->hd = NULL; err = url_open(&s->hd, buf, URL_RDWR); |