stream_file: Simplify and document MinGW stdin hack

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31964 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-08-16 10:45:37 +00:00 committed by Uoti Urpala
parent b7d40eab7d
commit 112d8dd2fd
1 changed files with 4 additions and 3 deletions

View File

@ -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;