mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
examples: check argument is valid
This commit is contained in:
parent
af3fd19637
commit
c9089e15b3
1 changed files with 5 additions and 1 deletions
|
@ -142,8 +142,12 @@ main (int argc, gchar ** argv)
|
|||
/* We set our output URI and rendering setting on the pipeline */
|
||||
if (gst_uri_is_valid (argv[1])) {
|
||||
output_uri = g_strdup (argv[1]);
|
||||
} else {
|
||||
} else if (g_file_test (argv[1], G_FILE_TEST_EXISTS)) {
|
||||
output_uri = gst_filename_to_uri (argv[1], NULL);
|
||||
} else {
|
||||
g_printerr ("Unrecognised command line argument '%s'.\n"
|
||||
"Please pass an URI or file as argument!\n", argv[1]);
|
||||
return -1;
|
||||
}
|
||||
profile = make_encoding_profile (audio, container);
|
||||
if (!ges_pipeline_set_render_settings (pipeline, output_uri, profile))
|
||||
|
|
Loading…
Reference in a new issue