mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 21:07:29 +01:00
Files should be opened in binary mode on OS/2.
patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29346 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c9280563fe
commit
bf67bb10a1
@ -119,7 +119,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
|
||||
filename++;
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN__)|| defined(__MINGW32__)
|
||||
#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
|
||||
m |= O_BINARY;
|
||||
#endif
|
||||
|
||||
@ -128,13 +128,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
|
||||
// read from stdin
|
||||
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
|
||||
f=0; // 0=stdin
|
||||
#ifdef __MINGW32__
|
||||
#if defined(__MINGW32__) || defined(__OS2__)
|
||||
setmode(fileno(stdin),O_BINARY);
|
||||
#endif
|
||||
} else {
|
||||
mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
|
||||
f=1;
|
||||
#ifdef __MINGW32__
|
||||
#if defined(__MINGW32__) || defined(__OS2__)
|
||||
setmode(fileno(stdout),O_BINARY);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user