diff options
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r-- | stream/stream_file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index 1f46a01f41..f506a0f644 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -167,10 +167,11 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { 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; |