aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-10 14:55:18 +0200
committerMartin Storsjö <martin@martin.st>2011-11-18 10:59:53 +0200
commitf5c5d57b57ba74be4d8475d729675e464ed4ecb9 (patch)
treef118df789f4c13311c4d4006039e5c7a3082674f
parent9f1dae944e2cf72800eb79b32e831b59fd6afdb0 (diff)
downloadffmpeg-f5c5d57b57ba74be4d8475d729675e464ed4ecb9.tar.gz
http: Reorder two code blocks
This is in preparation for a later commit. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/http.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 5941925118..45253d4efd 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -110,6 +110,14 @@ static int http_open_cnx(URLContext *h)
path1, sizeof(path1), s->location);
ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL);
+ if (!strcmp(proto, "https")) {
+ lower_proto = "tls";
+ if (port < 0)
+ port = 443;
+ }
+ if (port < 0)
+ port = 80;
+
if (path1[0] == '\0')
path = "/";
else
@@ -124,13 +132,6 @@ static int http_open_cnx(URLContext *h)
av_url_split(NULL, 0, proxyauth, sizeof(proxyauth),
hostname, sizeof(hostname), &port, NULL, 0, proxy_path);
}
- if (!strcmp(proto, "https")) {
- lower_proto = "tls";
- if (port < 0)
- port = 443;
- }
- if (port < 0)
- port = 80;
ff_url_join(buf, sizeof(buf), lower_proto, NULL, hostname, port, NULL);
err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE,