diff --git a/libavformat/file.c b/libavformat/file.c index b1d61caf89..83f2e42ae1 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -103,6 +103,9 @@ static int pipe_open(URLContext *h, const char *filename, int flags) } else { fd = 0; } +#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__) + setmode(fd, O_BINARY); +#endif h->priv_data = (void *)fd; return 0; }