summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index b81ab93cfc..b7983e7c98 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -181,6 +181,12 @@ static int tcp_close(URLContext *h)
return 0;
}
+static int tcp_get_file_handle(URLContext *h)
+{
+ TCPContext *s = h->priv_data;
+ return s->fd;
+}
+
URLProtocol tcp_protocol = {
"tcp",
tcp_open,
@@ -188,4 +194,5 @@ URLProtocol tcp_protocol = {
tcp_write,
NULL, /* seek */
tcp_close,
+ .url_get_file_handle = tcp_get_file_handle,
};