From: Andriy Tryshnivskyy Date: Thu, 2 Dec 2021 11:07:58 +0000 (+0200) Subject: Disable buffering on stdout. X-Git-Tag: 11.0.5~3 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps%2Fcamera-gstreamer.git;a=commitdiff_plain;h=88fde6fd98c0c4330cd91af267efa2f5492da180 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 --- 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);