playback-test: guard against crash on failure to create pipeline

It can happen when giving incorrect parameters (ie, a URI when
expecting a pipeline, etc)
This commit is contained in:
Vincent Penquerc'h 2017-05-11 10:59:21 +01:00
parent 60e9629860
commit fc3a07c6a6

View file

@ -3478,7 +3478,10 @@ main (int argc, char **argv)
}
pipelines[app.pipeline_type].func (&app, app.current_path->data);
g_assert (app.pipeline);
if (!app.pipeline || !GST_IS_PIPELINE (app.pipeline)) {
g_print ("Pipeline failed on %s\n", argv[3]);
exit (-1);
}
create_ui (&app);