From 70d8077b795766e2486e6ec8110f22a97362d6d6 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Thu, 29 Oct 2020 21:56:17 +0200 Subject: tls: Hook up the url_get_short_seek function in the TLS backends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes sure that small seeks forward on https don't end up doing new requests. Signed-off-by: Martin Storsjö --- libavformat/tls_openssl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavformat/tls_openssl.c') diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 002197fa76..e0616acbc8 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -351,6 +351,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), { NULL } @@ -370,6 +376,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, -- cgit v1.2.3