mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
scenario: Error out and exit when we fail loading a scenario
This commit is contained in:
parent
744cb70b75
commit
75356d4bbe
1 changed files with 10 additions and 4 deletions
|
@ -597,14 +597,14 @@ _load_scenario_file (GstValidateScenario * scenario,
|
|||
|
||||
structure = gst_structure_from_string (lines[i], NULL);
|
||||
if (structure == NULL) {
|
||||
GST_WARNING_OBJECT (scenario, "Could not parse action %s", lines[i]);
|
||||
continue;
|
||||
GST_ERROR_OBJECT (scenario, "Could not parse action %s", lines[i]);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
type = gst_structure_get_name (structure);
|
||||
if (!g_hash_table_lookup (action_types_table, type)) {
|
||||
GST_WARNING_OBJECT (scenario, "We do not handle action types %s", type);
|
||||
continue;
|
||||
GST_ERROR_OBJECT (scenario, "We do not handle action types %s", type);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
action = g_slice_new0 (GstValidateAction);
|
||||
|
@ -693,6 +693,12 @@ done:
|
|||
if (lfilename)
|
||||
g_free (lfilename);
|
||||
|
||||
if (ret == FALSE) {
|
||||
g_printerr ("Could not set scenario %s => EXIT\n", scenario_name);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
invalid_name:
|
||||
|
|
Loading…
Reference in a new issue