aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2018-05-22 18:59:59 +0200
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-05-31 01:24:51 +0300
commitca97239cb6f3ff08d1e9be384352e2a9bd8694e1 (patch)
tree24eeb11f97892901b3a8da3e497f8528defd2d34 /stream
parent935846fc40abdffe53366baf3a81cfb0e0fccd95 (diff)
options: add --http-proxy
Often requested, trivial.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_lavf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c
index 09866ff74f..e64e2484a0 100644
--- a/stream/stream_lavf.c
+++ b/stream/stream_lavf.c
@@ -46,6 +46,7 @@ struct stream_lavf_params {
char *tls_cert_file;
char *tls_key_file;
double timeout;
+ char *http_proxy;
};
const struct m_sub_options stream_lavf_conf = {
@@ -61,6 +62,7 @@ const struct m_sub_options stream_lavf_conf = {
OPT_STRING("tls-cert-file", tls_cert_file, M_OPT_FILE),
OPT_STRING("tls-key-file", tls_key_file, M_OPT_FILE),
OPT_DOUBLE("network-timeout", timeout, M_OPT_MIN, .min = 0),
+ OPT_STRING("http-proxy", http_proxy, 0),
{0}
},
.size = sizeof(struct stream_lavf_params),
@@ -224,6 +226,8 @@ void mp_setup_av_network_options(AVDictionary **dict, struct mpv_global *global,
snprintf(buf, sizeof(buf), "%lld", (long long)(opts->timeout * 1e6));
av_dict_set(dict, "timeout", buf, 0);
}
+ if (opts->http_proxy && opts->http_proxy[0])
+ av_dict_set(dict, "http_proxy", opts->http_proxy, 0);
mp_set_avdict(dict, opts->avopts);