LameXP/etc/Patches/FAAD-v2.8.6-Win32-Flush-Fix.diff

27 lines
575 B
Diff

frontend/main.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/frontend/main.c b/frontend/main.c
index d433253..34d4eab 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -80,11 +80,16 @@ static void faad_fprintf(FILE *stream, const char *fmt, ...)
if (!quiet)
{
va_start(ap, fmt);
-
vfprintf(stream, fmt, ap);
-
va_end(ap);
}
+
+#ifdef _WIN32
+ if (!_isatty(_fileno(stream)))
+ {
+ fflush(stream); /*ensure real-time progress output on Win32*/
+ }
+#endif
}
/* FAAD file buffering routines */