[FFmpeg-devel] [PATCH 2/3] tls: Hook up the url_get_short_seek function in the TLS backends
Martin Storsjö
martin at martin.st
Fri Oct 30 13:01:21 EET 2020
This makes sure that small seeks forward on https don't end up
doing new requests.
---
libavformat/tls.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavformat/tls.h b/libavformat/tls.h
index 4f3315427d..d33af80454 100644
--- a/libavformat/tls.h
+++ b/libavformat/tls.h
@@ -56,10 +56,17 @@ static int tls_get_file_handle(URLContext *h) \
{ \
TLSContext *c = h->priv_data; \
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); \
}
+
#define TLS_COMMON_PROTOCOL_FIELDS \
.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
--
2.24.3 (Apple Git-128)
More information about the ffmpeg-devel
mailing list