gst-validate: initialize gst/glib before use in scenario listing

Also ensure that if just -l is passed, we don't try creating a
non existent pipeline.

This makes gst-validate -l work properly again.
This commit is contained in:
Vincent Penquerc'h 2013-09-04 10:50:11 -04:00 committed by Thiago Santos
parent 789ea6e9d5
commit 3019586677

View file

@ -147,12 +147,16 @@ main (int argc, gchar ** argv)
g_option_context_free (ctx); g_option_context_free (ctx);
if (list_scenarios)
gst_validate_list_scenarios ();
gst_init (&argc, &argv); gst_init (&argc, &argv);
gst_validate_init (); gst_validate_init ();
if (list_scenarios)
gst_validate_list_scenarios ();
if (argc == 1) {
g_print ("%s", g_option_context_get_help (ctx, FALSE, NULL));
exit (1);
}
/* Create the pipeline */ /* Create the pipeline */
argvn = g_new0 (char *, argc); argvn = g_new0 (char *, argc);