[FFmpeg-cvslog] fftools/ffprobe: Disable stderr buffering on Windows
softworkz
git at videolan.org
Sat May 3 08:59:20 EEST 2025
ffmpeg | branch: master | softworkz <softworkz at hotmail.com> | Sat Apr 19 23:34:29 2025 +0200| [1dbc5675c18d34c6e3e32be38f3cd1f4fb9f0257] | committer: softworkz
fftools/ffprobe: Disable stderr buffering on Windows
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 <softworkz at hotmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dbc5675c18d34c6e3e32be38f3cd1f4fb9f0257
---
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;
More information about the ffmpeg-cvslog
mailing list