From 1dbc5675c18d34c6e3e32be38f3cd1f4fb9f0257 Mon Sep 17 00:00:00 2001 From: softworkz Date: Sat, 19 Apr 2025 23:34:29 +0200 Subject: [PATCH] fftools/ffprobe: Disable stderr buffering on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An identical call exists in ffmpeg.c With POSIX/glibc, stderr is already unbuffered (or line-buffered when a terminal is connected), but not in case of MSVCRT. Explicitly calling setvbuf() like in this commit, makes the Windows runtime behave like POSIX, giving the same “print immediately” behavior. Signed-off-by: softworkz --- fftools/ffprobe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index f5c83925b9..d980d4e64f 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3081,6 +3081,8 @@ int main(int argc, char **argv) init_dynload(); + setvbuf(stderr, NULL, _IONBF, 0); /* win32 runtime needs this */ + av_log_set_flags(AV_LOG_SKIP_REPEATED); options = real_options;