]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tls_gnutls.c
Merge commit '8b7a9729aa162e2bbd571933f1aa40767f1ff47b'
[ffmpeg] / libavformat / tls_gnutls.c
index 991b36b95fc8bd83e143eddb1720586a2584b42d..ecc80bfac3f05b2b8949e3e54271bb82578aba98 100644 (file)
@@ -235,6 +235,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 }
@@ -253,6 +259,7 @@ const URLProtocol ff_tls_gnutls_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,