From b2e24f42d557536305c4f8624e1d568d9c26b6af Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 May 2018 18:59:59 +0200 Subject: options: add --http-proxy Often requested, trivial. --- stream/stream_lavf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stream') diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index fea6f4b62d..9470d3d527 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -47,6 +47,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 = { @@ -62,6 +63,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), @@ -225,6 +227,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); -- cgit v1.2.3