mirror of
https://github.com/mpv-player/mpv
synced 2025-03-23 03:37:27 +00: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++;
|
filename++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__CYGWIN__)|| defined(__MINGW32__)
|
#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
|
||||||
m |= O_BINARY;
|
m |= O_BINARY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -128,13 +128,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
// read from stdin
|
// read from stdin
|
||||||
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
|
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
|
||||||
f=0; // 0=stdin
|
f=0; // 0=stdin
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(__OS2__)
|
||||||
setmode(fileno(stdin),O_BINARY);
|
setmode(fileno(stdin),O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
|
mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
|
||||||
f=1;
|
f=1;
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(__OS2__)
|
||||||
setmode(fileno(stdout),O_BINARY);
|
setmode(fileno(stdout),O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user