avformat/tls_{openssl,mbedtls}: parse host when external_sock is true

See 28b92b9b2e

Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
This commit is contained in:
Jack Lau
2026-06-14 14:09:57 +08:00
parent e2eee22f16
commit a9e27e2e0c
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -509,6 +509,9 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
if (!shr->external_sock) {
if ((ret = ff_tls_open_underlying(shr, h, uri, options)) < 0)
goto fail;
} else if (!shr->host) {
if ((ret = ff_tls_parse_host(shr, shr->underlying_host, sizeof(shr->underlying_host), NULL, uri)) < 0)
goto fail;
}
#ifdef MBEDTLS_PSA_CRYPTO_C
+3
View File
@@ -783,6 +783,9 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
if (!c->tls_shared.external_sock) {
if ((ret = ff_tls_open_underlying(&c->tls_shared, h, uri, options)) < 0)
goto fail;
} else if (!s->host) {
if ((ret = ff_tls_parse_host(s, s->underlying_host, sizeof(s->underlying_host), NULL, uri)) < 0)
goto fail;
}
// We want to support all versions of TLS >= 1.0, but not the deprecated