[Mplayer-cvslog] CVS: main/libmpdemux stream_file.c,1.5,1.6

Sascha Sommer CVS syncmail at mplayerhq.hu
Sat Jul 31 13:08:50 CEST 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv8486

Modified Files:
	stream_file.c 
Log Message:
mingw stdin fixes

Index: stream_file.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream_file.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- stream_file.c	13 Mar 2004 16:10:02 -0000	1.5
+++ stream_file.c	31 Jul 2004 11:08:47 -0000	1.6
@@ -96,9 +96,15 @@
       // read from stdin
       mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
       f=0; // 0=stdin
+#ifdef __MINGW32__
+	  setmode(fileno(stdin),O_BINARY);
+#endif
     } else {
       mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
       f=1;
+#ifdef __MINGW32__
+	  setmode(fileno(stdout),O_BINARY);
+#endif
     }
   } else {
     f=open(p->filename,m);
@@ -110,7 +116,11 @@
   }
 
   len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET);
+#ifdef __MINGW32__
+  if(f==0 || len == -1) {
+#else
   if(len == -1) {
+#endif
     stream->seek = seek_forward;
     stream->type = STREAMTYPE_STREAM; // Must be move to STREAMTYPE_FILE
     stream->flags |= STREAM_SEEK_FW;




More information about the MPlayer-cvslog mailing list