# HG changeset patch # User reimar # Date 1281955537 0 # Node ID b14ca9b6b6d4a3de50d48c809af026a6dd54518f # Parent ef30e15059698adba88cef9929022220a912ed63 Simplify and document MinGW stdin hack. diff -r ef30e1505969 -r b14ca9b6b6d4 stream/stream_file.c --- a/stream/stream_file.c Mon Aug 16 10:33:33 2010 +0000 +++ b/stream/stream_file.c Mon Aug 16 10:45:37 2010 +0000 @@ -168,10 +168,11 @@ len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET); #ifdef __MINGW32__ - if(f==0 || len == -1) { -#else + // seeks on stdin incorrectly succeed on MinGW + if(f==0) + len = -1; +#endif if(len == -1) { -#endif if(mode == STREAM_READ) stream->seek = seek_forward; stream->type = STREAMTYPE_STREAM; // Must be move to STREAMTYPE_FILE stream->flags |= MP_STREAM_SEEK_FW;