ffmpeg | branch: master | softworkz <softwo...@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 <softwo...@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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to