]> sigrok.org Git - sigrok-cli.git/blobdiff - main.c
decode: add support for Google Trace Event output (JSON)
[sigrok-cli.git] / main.c
diff --git a/main.c b/main.c
index 829492f5704aa8b3b0f4d5f2a1c48a1d4b61709a..aa4f1229888fa91f961cce2d88dd32e1cd93c997 100644 (file)
--- a/main.c
+++ b/main.c
@@ -242,6 +242,8 @@ int main(int argc, char **argv)
                if (opt_pd_binary) {
                        if (setup_pd_binary(opt_pd_binary) != 0)
                                goto done;
+                       if (setup_binary_stdout() != 0)
+                               goto done;
                        if (srd_pd_output_callback_add(srd_sess, SRD_OUTPUT_BINARY,
                                        show_pd_binary, NULL) != SRD_OK)
                                goto done;
@@ -259,6 +261,7 @@ int main(int argc, char **argv)
                                        show_pd_annotations, NULL) != SRD_OK)
                                goto done;
                }
+               show_pd_prepare();
        }
 #endif
 
@@ -298,6 +301,8 @@ int main(int argc, char **argv)
                show_help();
 
 #ifdef HAVE_SRD
+       if (opt_pds)
+               show_pd_close();
        if (opt_pds)
                srd_exit();
 #endif