[FFmpeg-devel] [PATCH 3/5] tls: parse uri path options to underlying tcp URLContext
Peter Ross
pross at xvid.org
Sun Jul 22 06:25:02 CEST 2012
---
libavformat/tls.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/tls.c b/libavformat/tls.c
index 1edccb2..2fdf9c5 100644
--- a/libavformat/tls.c
+++ b/libavformat/tls.c
@@ -160,7 +160,7 @@ static int tls_open(URLContext *h, const char *uri, int flags)
TLSContext *c = h->priv_data;
int ret;
int port;
- char buf[200], host[200];
+ char buf[200], host[200], path[1024];
int numerichost = 0;
struct addrinfo hints = { 0 }, *ai = NULL;
const char *proxy_path;
@@ -172,8 +172,8 @@ static int tls_open(URLContext *h, const char *uri, int flags)
use_proxy = (proxy_path != NULL) && !getenv("no_proxy") &&
av_strstart(proxy_path, "http://", NULL);
- av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0, uri);
- ff_url_join(buf, sizeof(buf), "tcp", NULL, host, port, NULL);
+ av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, path, sizeof(path), uri);
+ ff_url_join(buf, sizeof(buf), "tcp", NULL, host, port, "%s", path);
hints.ai_flags = AI_NUMERICHOST;
if (!getaddrinfo(host, NULL, &hints, &ai)) {
--
1.7.10.4
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120722/c1fd5553/attachment.asc>
More information about the ffmpeg-devel
mailing list