validate: tools: media-check: When comparing with a file just compare

We do not want to know if the file is seekable etc, but in that case we
want to see that the results are stable throughout the various runs

Also make sure to report an understandable error if the media file info
could not be parsed
This commit is contained in:
Thibault Saunier 2014-01-13 11:07:43 +01:00
parent 677e111f0b
commit a3e7342eef

View file

@ -223,6 +223,7 @@ main (int argc, gchar ** argv)
GstValidateMediaInfo *expected_mi;
GError *err = NULL;
ret = TRUE;
if (!g_path_is_absolute (expected_file)) {
gchar *cdir = g_get_current_dir ();
gchar *absolute = g_build_filename (cdir, expected_file, NULL);
@ -234,7 +235,10 @@ main (int argc, gchar ** argv)
}
expected_mi = gst_validate_media_info_load (expected_file, &err);
if (expected_mi) {
if (err) {
g_print ("Error loading %s: %s", expected_file, err->message);
ret = FALSE;
} else if (expected_mi) {
if (!gst_validate_media_info_compare (expected_mi, &mi)) {
g_print ("Expected results didn't match\n");
ret = FALSE;