]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tls_securetransport.c
Merge commit 'b0f36a0043d76436cc7ab8ff92ab99c94595d3c0'
[ffmpeg] / libavformat / tls_securetransport.c
index 253c89c5ab29b63d1dccc36c0b9a8d4aa5c70939..bc8a32069e27d3a5c9adbf68dc190b24aff39bae 100644 (file)
@@ -375,6 +375,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 }
@@ -393,6 +399,7 @@ const URLProtocol ff_tls_securetransport_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,