diff options
author | Martin Storsjö <martin@martin.st> | 2020-10-29 21:56:17 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-11-05 09:22:17 +0200 |
commit | 70d8077b795766e2486e6ec8110f22a97362d6d6 (patch) | |
tree | 63e03b9a6879296ee592c4279b6b955dc3321bee /libavformat/tls_mbedtls.c | |
parent | a1553b0cfbff92223caaed4103b92373b2339173 (diff) | |
download | ffmpeg-70d8077b795766e2486e6ec8110f22a97362d6d6.tar.gz |
tls: Hook up the url_get_short_seek function in the TLS backends
This makes sure that small seeks forward on https don't end up
doing new requests.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/tls_mbedtls.c')
-rw-r--r-- | libavformat/tls_mbedtls.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 965adf1be4..aadf17760d 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -326,6 +326,12 @@ static int tls_get_file_handle(URLContext *h) return ffurl_get_file_handle(c->tls_shared.tcp); } +static int tls_get_short_seek(URLContext *h) +{ + TLSContext *s = h->priv_data; + return ffurl_get_short_seek(s->tls_shared.tcp); +} + static const AVOption options[] = { TLS_COMMON_OPTIONS(TLSContext, tls_shared), \ {"key_password", "Password for the private key file", OFFSET(priv_key_pw), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ @@ -346,6 +352,7 @@ const URLProtocol ff_tls_protocol = { .url_write = tls_write, .url_close = tls_close, .url_get_file_handle = tls_get_file_handle, + .url_get_short_seek = tls_get_short_seek, .priv_data_size = sizeof(TLSContext), .flags = URL_PROTOCOL_FLAG_NETWORK, .priv_data_class = &tls_class, |