summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:15 +0000
commitbff6c10f6909412899de6ab7c902f96080905550 (patch)
tree616d06233c652837e0d36657306ed0c157821a9a /stream/stream_file.c
parentReleasing progress-linux version 0.37.0-1~progress7.99u1. (diff)
downloadmpv-bff6c10f6909412899de6ab7c902f96080905550.tar.xz
mpv-bff6c10f6909412899de6ab7c902f96080905550.zip
Merging upstream version 0.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--stream/stream_file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index 4895a83..89e7a2d 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -50,6 +50,7 @@
#ifdef _WIN32
#include <windows.h>
+#include <winioctl.h>
#include <winternl.h>
#include <io.h>
@@ -306,6 +307,7 @@ static int open_f(stream_t *stream, const struct stream_open_args *args)
}
struct stat st;
+ bool is_sock_or_fifo = false;
if (fstat(p->fd, &st) == 0) {
if (S_ISDIR(st.st_mode)) {
stream->is_directory = true;
@@ -319,6 +321,9 @@ static int open_f(stream_t *stream, const struct stream_open_args *args)
fcntl(p->fd, F_SETFL, val);
#endif
} else {
+#ifndef __MINGW32__
+ is_sock_or_fifo = S_ISSOCK(st.st_mode) || S_ISFIFO(st.st_mode);
+#endif
p->use_poll = true;
}
}
@@ -340,7 +345,7 @@ static int open_f(stream_t *stream, const struct stream_open_args *args)
stream->get_size = get_size;
stream->close = s_close;
- if (check_stream_network(p->fd)) {
+ if (is_sock_or_fifo || check_stream_network(p->fd)) {
stream->streaming = true;
#if HAVE_COCOA
if (fcntl(p->fd, F_RDAHEAD, 0) < 0) {