X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Ftls_openssl.c;h=e0616acbc8f2c6fae9970d1f30017b74a1ebab5b;hb=7b30dad3a696cc5423218ba0c11a48b6009a121b;hp=e305b2465a0d704e8409d10c73366b1cca631003;hpb=abf5e7bc212f4cc1e022907f92506ab33c19de44;p=ffmpeg diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index e305b2465a0..e0616acbc8f 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -142,8 +142,7 @@ static int tls_close(URLContext *h) } if (c->ctx) SSL_CTX_free(c->ctx); - if (c->tls_shared.tcp) - ffurl_close(c->tls_shared.tcp); + ffurl_closep(&c->tls_shared.tcp); #if OPENSSL_VERSION_NUMBER >= 0x1010000fL if (c->url_bio_method) BIO_meth_free(c->url_bio_method); @@ -352,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 } @@ -371,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,