gst-validate: do not try to use a pipeline which failed to create

Instead, error out properly with the actual error, if available.
This commit is contained in:
Vincent Penquerc'h 2013-09-04 11:05:48 -04:00 committed by Thiago Santos
parent 3019586677
commit 9cf4857776

View file

@ -163,7 +163,11 @@ main (int argc, gchar ** argv)
memcpy (argvn, argv + 1, sizeof (char *) * (argc - 1));
pipeline = (GstElement *) gst_parse_launchv ((const gchar **) argvn, &err);
g_free (argvn);
if (!pipeline) {
g_print ("Failed to create pipeline: %s\n",
err ? err->message : "unknown reason");
exit (1);
}
#ifdef G_OS_UNIX
signal_watch_id =
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);