Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Ridgeway <jayridge@gmail.com>2016-10-16 17:28:21 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-17 21:46:30 +0300
commit295601bba3023b14264fcfee64e7a386cd7753cd (patch)
tree71baba57fae99fc1c8e25d94e107e97f35974e65 /libavformat/tls_openssl.c
parent6b517a194da47a2d586806679ef6ca9233ee32d6 (diff)
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.c7
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,