This fix allows the pipe to be used in windows. 

Daniel
diff --git a/cli/cli.c b/cli/cli.c
index 376062e..197bdf9 100644
--- a/cli/cli.c
+++ b/cli/cli.c
@@ -24,6 +24,10 @@
 #include <libavformat/avformat.h>
 #endif
 
+#ifdef __MINGW32__
+#include <fcntl.h>
+#endif
+
 /* Represent the data of an input file. */
 typedef struct input_file_data
 {
@@ -460,6 +464,11 @@ void open_yuv_file(video_data *v, input_file_data *ifd)
     if (!strcmp(ifd->path, "-"))
     {
         ifd->file_handle = stdin;
+
+        #ifdef __MINGW32__
+        // Windows open stdin as text. Set it to binary mode.
+        setmode(fileno(stdin), O_BINARY);
+        #endif
     }
 
     /* Open the specified file. */

Reply via email to