diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-24 16:22:40 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-24 16:22:40 +0000 |
commit | f23a9759cee8442b02195a4539f65d041104c9cb (patch) | |
tree | bb432d2934d049a38012f649bac41875b41e7603 /libavformat | |
parent | 090a41790e10d6903e1ccee21f153b9558390cd6 (diff) | |
download | ffmpeg-f23a9759cee8442b02195a4539f65d041104c9cb.tar.gz |
Remove check for @ in tcp.c which removes the authorization data from the
actual hostname. This functionality already exists (and always existed) in
url_split() and is therefore useless. See discussion in "[PATCH] tcp.c/udp.c
memleak?" thread on ffmpeg-devel.
Originally committed as revision 14946 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/tcp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index 7672d25ca3..1b13c5686e 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -38,7 +38,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) int fd_max, ret; struct timeval tv; socklen_t optlen; - char hostname[1024],proto[1024],path[1024],tmp[1024],*q; + char hostname[1024],proto[1024],path[1024]; if(!ff_network_init()) return AVERROR(EIO); @@ -47,7 +47,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags) &port, path, sizeof(path), uri); if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) return AVERROR(EINVAL); - if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); } dest_addr.sin_family = AF_INET; dest_addr.sin_port = htons(port); |