mirror of https://git.ffmpeg.org/ffmpeg.git
tls: parse uri path options to underlying tcp URLContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b2460858f6
commit
d1146d67ca
|
@ -160,7 +160,7 @@ static int tls_open(URLContext *h, const char *uri, int flags)
|
||||||
TLSContext *c = h->priv_data;
|
TLSContext *c = h->priv_data;
|
||||||
int ret;
|
int ret;
|
||||||
int port;
|
int port;
|
||||||
char buf[200], host[200];
|
char buf[200], host[200], path[1024];
|
||||||
int numerichost = 0;
|
int numerichost = 0;
|
||||||
struct addrinfo hints = { 0 }, *ai = NULL;
|
struct addrinfo hints = { 0 }, *ai = NULL;
|
||||||
const char *proxy_path;
|
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") &&
|
use_proxy = (proxy_path != NULL) && !getenv("no_proxy") &&
|
||||||
av_strstart(proxy_path, "http://", NULL);
|
av_strstart(proxy_path, "http://", NULL);
|
||||||
|
|
||||||
av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0, uri);
|
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, NULL);
|
ff_url_join(buf, sizeof(buf), "tcp", NULL, host, port, "%s", path);
|
||||||
|
|
||||||
hints.ai_flags = AI_NUMERICHOST;
|
hints.ai_flags = AI_NUMERICHOST;
|
||||||
if (!getaddrinfo(host, NULL, &hints, &ai)) {
|
if (!getaddrinfo(host, NULL, &hints, &ai)) {
|
||||||
|
|
Loading…
Reference in New Issue