diff options
author | Jay Ridgeway <jayridge@gmail.com> | 2016-10-16 10:28:21 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-17 19:46:30 +0100 |
commit | 295601bba3023b14264fcfee64e7a386cd7753cd (patch) | |
tree | 71baba57fae99fc1c8e25d94e107e97f35974e65 /libavformat/tls_openssl.c | |
parent | 6b517a194da47a2d586806679ef6ca9233ee32d6 (diff) | |
download | ffmpeg-295601bba3023b14264fcfee64e7a386cd7753cd.tar.gz |
avformat/tls: add tls url_get_file_handle
Support url_get_file_handle on TLS streams.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/tls_openssl.c')
-rw-r--r-- | libavformat/tls_openssl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 178ca9e0e4..3d9768a805 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -325,6 +325,12 @@ static int tls_write(URLContext *h, const uint8_t *buf, int size) return print_tls_error(h, ret); } +static int tls_get_file_handle(URLContext *h) +{ + TLSContext *c = h->priv_data; + return ffurl_get_file_handle(c->tls_shared.tcp); +} + static const AVOption options[] = { TLS_COMMON_OPTIONS(TLSContext, tls_shared), { NULL } @@ -343,6 +349,7 @@ const URLProtocol ff_tls_openssl_protocol = { .url_read = tls_read, .url_write = tls_write, .url_close = tls_close, + .url_get_file_handle = tls_get_file_handle, .priv_data_size = sizeof(TLSContext), .flags = URL_PROTOCOL_FLAG_NETWORK, .priv_data_class = &tls_class, |