mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-25 22:19:17 +00:00
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
This commit is contained in:
parent
780d7897a9
commit
57b5555c91
6 changed files with 30 additions and 24 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue