Reapply "options: parse tls-related options as path"

This reverts commit 5c4c067ee6.
This commit is contained in:
Dudemanguy
2025-08-07 19:13:06 -05:00
parent 29307c26ba
commit 26373c5497
+12 -6
View File
@@ -199,12 +199,18 @@ void mp_setup_av_network_options(AVDictionary **dict, const char *target_fmt,
av_dict_set(dict, "cookies", cookies, 0);
}
av_dict_set(dict, "tls_verify", opts->tls_verify ? "1" : "0", 0);
if (opts->tls_ca_file)
av_dict_set(dict, "ca_file", opts->tls_ca_file, 0);
if (opts->tls_cert_file)
av_dict_set(dict, "cert_file", opts->tls_cert_file, 0);
if (opts->tls_key_file)
av_dict_set(dict, "key_file", opts->tls_key_file, 0);
if (opts->tls_ca_file) {
char *file = mp_get_user_path(temp, global, opts->tls_ca_file);
av_dict_set(dict, "ca_file", file, 0);
}
if (opts->tls_cert_file) {
char *file = mp_get_user_path(temp, global, opts->tls_cert_file);
av_dict_set(dict, "cert_file", file, 0);
}
if (opts->tls_key_file) {
char *file = mp_get_user_path(temp, global, opts->tls_key_file);
av_dict_set(dict, "key_file", file, 0);
}
char *cust_headers = talloc_strdup(temp, "");
if (opts->referrer) {
cust_headers = talloc_asprintf_append(cust_headers, "Referer: %s\r\n",