[FFmpeg-devel] [PATCH] tls: Hook up the url_get_short_seek function in the TLS backends

Martin Storsjö martin at martin.st
Thu Oct 29 22:39:49 EET 2020


On Thu, 29 Oct 2020, Andreas Rheinhardt wrote:

> Martin Storsjö:
>> This makes sure that small seeks forward on https don't end up
>> doing new requests.
>> ---
>>  libavformat/tls_gnutls.c          | 7 +++++++
>>  libavformat/tls_libtls.c          | 7 +++++++
>>  libavformat/tls_mbedtls.c         | 7 +++++++
>>  libavformat/tls_openssl.c         | 7 +++++++
>>  libavformat/tls_schannel.c        | 7 +++++++
>>  libavformat/tls_securetransport.c | 7 +++++++
>>  6 files changed, 42 insertions(+)
>> 
> All the TLSContexts begin with a common initial sequence, namely
>    const AVClass *class;
>    TLSShared tls_shared;
> So using different functions for them is avoidable.

Yes - and that would also go for the preexisting url_get_file_handle that 
works pretty much the same as this one. It requires a bit more blind 
casting (no easy verification if one backend would have a different layout 
for its context) though...

// Martin


More information about the ffmpeg-devel mailing list