mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
media-check: return nonzero if a test failed
This commit is contained in:
parent
1713442fd3
commit
387f7c1b63
1 changed files with 4 additions and 1 deletions
|
@ -151,6 +151,7 @@ main (int argc, gchar ** argv)
|
||||||
gchar *output_file = NULL;
|
gchar *output_file = NULL;
|
||||||
gchar *output = NULL;
|
gchar *output = NULL;
|
||||||
gsize outputlength;
|
gsize outputlength;
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
GOptionEntry options[] = {
|
GOptionEntry options[] = {
|
||||||
{"output-file", 'o', 0, G_OPTION_ARG_FILENAME,
|
{"output-file", 'o', 0, G_OPTION_ARG_FILENAME,
|
||||||
|
@ -188,7 +189,7 @@ main (int argc, gchar ** argv)
|
||||||
g_option_context_free (ctx);
|
g_option_context_free (ctx);
|
||||||
|
|
||||||
gst_validate_media_info_init (&mi);
|
gst_validate_media_info_init (&mi);
|
||||||
gst_validate_media_info_inspect_uri (&mi, argv[1], NULL);
|
ret = gst_validate_media_info_inspect_uri (&mi, argv[1], NULL);
|
||||||
output = gst_validate_media_info_to_string (&mi, &outputlength);
|
output = gst_validate_media_info_to_string (&mi, &outputlength);
|
||||||
|
|
||||||
if (output_file)
|
if (output_file)
|
||||||
|
@ -198,5 +199,7 @@ main (int argc, gchar ** argv)
|
||||||
|
|
||||||
g_print ("Media info:\n%s\n", output);
|
g_print ("Media info:\n%s\n", output);
|
||||||
g_free (output);
|
g_free (output);
|
||||||
|
if (!ret)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue