r31964 - trunk/stream/stream_file.c
Author: reimar Date: Mon Aug 16 12:45:37 2010 New Revision: 31964 Log: Simplify and document MinGW stdin hack. Modified: trunk/stream/stream_file.c Modified: trunk/stream/stream_file.c ============================================================================== --- trunk/stream/stream_file.c Mon Aug 16 12:33:33 2010 (r31963) +++ trunk/stream/stream_file.c Mon Aug 16 12:45:37 2010 (r31964) @@ -168,10 +168,11 @@ static int open_f(stream_t *stream,int m len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET); #ifdef __MINGW32__ - if(f==0 || len == -1) { -#else - if(len == -1) { + // seeks on stdin incorrectly succeed on MinGW + if(f==0) + len = -1; #endif + if(len == -1) { if(mode == STREAM_READ) stream->seek = seek_forward; stream->type = STREAMTYPE_STREAM; // Must be move to STREAMTYPE_FILE stream->flags |= MP_STREAM_SEEK_FW;
participants (1)
-
reimar