summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-05-13 19:27:22 +0000
committerkonablend <[email protected]>2009-05-13 19:27:22 +0000
commit78db7280456c556a3015f93ec54d579e2935085a (patch)
tree38faee0e05777b49461095997ca26d0f923a673e /test
parentb931a6d9c126957995a5517e8e249ad9a1e1828d (diff)
- 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
Diffstat (limited to 'test')
-rw-r--r--test/test.c8
1 files changed, 8 insertions, 0 deletions
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 */