comparison libmpdemux/open.c @ 8712:9e32c8ee5862

fixed stream errors on some cygwin installations
author faust3
date Thu, 02 Jan 2003 10:53:22 +0000
parents 0c258b964b08
children 6af7a6595cc9
comparison
equal deleted inserted replaced
8711:906f7a2dc085 8712:9e32c8ee5862
501 if(!strcmp(filename,"-")){ 501 if(!strcmp(filename,"-")){
502 // read from stdin 502 // read from stdin
503 mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN); 503 mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
504 f=0; // 0=stdin 504 f=0; // 0=stdin
505 } else { 505 } else {
506 #ifndef __CYGWIN__
506 f=open(filename,O_RDONLY); 507 f=open(filename,O_RDONLY);
508 #else
509 f=open(filename,O_RDONLY|O_BINARY);
510 #endif
507 if(f<0){ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);return NULL; } 511 if(f<0){ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);return NULL; }
508 } 512 }
509 513
510 len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET); 514 len=lseek(f,0,SEEK_END); lseek(f,0,SEEK_SET);
511 if (len == -1) 515 if (len == -1)