1
0
mirror of http://mpg123.de/trunk/.git synced 2025-07-31 13:24:22 +03:00

Use binary IO for stdin/stdout.

git-svn-id: svn://scm.orgis.org/mpg123/trunk@2904 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
jon_y
2011-03-12 16:16:13 +00:00
parent 272dfa7c49
commit 3c96c109ce

View File

@ -16,6 +16,10 @@
#include <io.h>
#endif
#ifdef _WIN32
#include <fcntl.h>
#endif
#include <stdio.h>
#define INBUFF 16384
@ -31,6 +35,11 @@ int main(int argc, char **argv)
size_t in = 0, outc = 0;
mpg123_handle *m;
#ifdef _WIN32
_setmode(_fileno(stdin),_O_BINARY);
_setmode(_fileno(stdout),_O_BINARY);
#endif
mpg123_init();
m = mpg123_new(argc > 1 ? argv[1] : NULL, &ret);
if(m == NULL)