gst-qa: show help and exit when no arguments are provided

Instead of attempting to create empty pipelines and weird things
happening :)
This commit is contained in:
Edward Hervey 2013-07-23 12:14:26 -03:00 committed by Thiago Santos
parent 04b3517e41
commit d7b2977657

View file

@ -79,6 +79,11 @@ main (int argc, gchar ** argv)
ctx = g_option_context_new ("- runs QA tests for a pipeline.");
g_option_context_add_main_entries (ctx, options, NULL);
if (argc == 1) {
g_print ("%s", g_option_context_get_help (ctx, FALSE, NULL));
exit (1);
}
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
g_printerr ("Error initializing: %s\n", err->message);
g_option_context_free (ctx);