From 57b5555c91a9792e3ac99102b3d1a5c44b45fdd9 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 5 Mar 2010 22:35:21 +0000 Subject: 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 --- libavformat/gopher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/gopher.c') 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); -- cgit v1.2.3