aomenc: add comment about fflush(stderr)
Add a comment regarding mingw-w64 gcc not matching msvc for stderr
buffering.
The other instance of cr does not need fflush as it is followed by a
newline in the same string
BUG=aomedia:2909
Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
Change-Id: I659a05febb4ee25c0a5cf74de05ae4bfb02776fc
diff --git a/apps/aomenc.c b/apps/aomenc.c
index d2062a8..0afaa7f 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -2385,6 +2385,10 @@
cx_time > 9999999 ? "ms" : "us", fps >= 1.0 ? fps : fps * 60,
fps >= 1.0 ? "fps" : "fpm");
print_time("ETA", estimated_time_left);
+ // mingw-w64 gcc does not match msvc for stderr buffering behavior
+ // and uses line buffering, thus the progress output is not
+ // real-time. The fflush() is here to make sure the progress output
+ // is sent out while the clip is being processed.
fflush(stderr);
}
@@ -2491,6 +2495,8 @@
: stream->cx_time,
stream->cx_time > 9999999 ? "ms" : "us",
usec_to_fps(stream->cx_time, seen_frames));
+ // This instance of cr does not need fflush as it is followed by a
+ // newline in the same string.
}
}