]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavformat/tcp.c
Add url_get_file_handle(), which is used to get the file descriptor
[frescor/ffmpeg.git] / libavformat / tcp.c
index b81ab93cfc374a694dcd8f6c4432b59b6f947f21..b7983e7c9899c327a5d50a11c522172c2bdab445 100644 (file)
@@ -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,
 };