From 78db7280456c556a3015f93ec54d579e2935085a Mon Sep 17 00:00:00 2001 From: konablend Date: Wed, 13 May 2009 19:27:22 +0000 Subject: - set HandBrakeCLI stdio/stderr to unbuffered on native win32 platform; desired behavior is line-buffering but on win32 msvcrt there is no such thing and it becomes full-buffering which delays log/output enough to make it nonsensical. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2415 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- test/test.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test.c') diff --git a/test/test.c b/test/test.c index a1d9262d1..3fecfb1cc 100644 --- a/test/test.c +++ b/test/test.c @@ -147,6 +147,14 @@ int main( int argc, char ** argv ) int build; char * version; +/* win32 _IOLBF (line-buffering) is the same as _IOFBF (full-buffering). + * force it to unbuffered otherwise informative output is not easily parsed. + */ +#if defined( _WIN32 ) || defined( __MINGW32__ ) + setvbuf( stdout, NULL, _IONBF, 0 ); + setvbuf( stderr, NULL, _IONBF, 0 ); +#endif + audios = hb_list_init(); /* Parse command line */ -- cgit v1.2.3