diff --git a/doc/examples/mpglib.c b/doc/examples/mpglib.c index bf3a30ec..4ee1a1d7 100644 --- a/doc/examples/mpglib.c +++ b/doc/examples/mpglib.c @@ -16,6 +16,10 @@ #include #endif +#ifdef _WIN32 +#include +#endif + #include #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)