From: Jan Schmidt Date: Sun, 16 Aug 2015 16:36:31 +0000 (+1000) Subject: test-record: Check parameter count and print out help X-Git-Tag: 1.19.3~495^2~607 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=2a41502cde51f736b37791bd78fe97f0cf8c3d05;p=platform%2Fupstream%2Fgstreamer.git test-record: Check parameter count and print out help If no launch pipeline was supplied, print out some help --- diff --git a/examples/test-record.c b/examples/test-record.c index 1c6ac3f..1c37503 100644 --- a/examples/test-record.c +++ b/examples/test-record.c @@ -51,6 +51,11 @@ main (int argc, char *argv[]) g_printerr ("Error parsing options: %s\n", error->message); return -1; } + + if (argc < 2) { + g_print ("%s\n", g_option_context_get_help (optctx, TRUE, NULL)); + return 1; + } g_option_context_free (optctx); loop = g_main_loop_new (NULL, FALSE);