aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com>2021-12-02 13:07:58 +0200
committerAndriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com>2021-12-04 11:40:42 +0200
commit88fde6fd98c0c4330cd91af267efa2f5492da180 (patch)
tree3a2447d35d376e04fe7b2fb9b3ad3c13efac373d
parentb89e581a2fab177e79d64b5990a464683eac49fa (diff)
Disable buffering on stdout.
It fix a problem when prints to sdtout are not visible in journalctl. Bug-AGL: SPEC-4166 Change-Id: I5652e84bdfd3307edf53d2d7d07c532f41faa909 Signed-off-by: Andriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com>
-rw-r--r--app/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 8634bbc..fff9c4c 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -672,6 +672,8 @@ int main(int argc, char *argv[])
DEFAULT_VIDEO_DEVICE, WINDOW_WIDTH_SIZE, WINDOW_HEIGHT_SIZE);
gst_init(&gargc, &gargv);
+ setbuf(stdout, NULL);
+
fprintf(stdout, "Using pipeline: %s\n", pipeline_str);
GstElement *pipeline = gst_parse_launch(pipeline_str, &error);