mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
validate:ssim: Let user know when no file have been compared
Fixing a possible division by zero issue. CID 1415482
This commit is contained in:
parent
28f8787c17
commit
566adba269
1 changed files with 7 additions and 3 deletions
|
@ -800,9 +800,13 @@ _check_directory (GstValidateSsim * self, const gchar * ref_dir,
|
|||
g_object_unref (info);
|
||||
}
|
||||
|
||||
gst_validate_printf (NULL,
|
||||
"\nAverage similarity: %f, min_avg: %f, min_min: %f\n",
|
||||
total_avg / nfiles, min_avg, min_min);
|
||||
if (nfiles == 0) {
|
||||
gst_validate_printf (NULL, "\nNo files to verify.\n");
|
||||
} else {
|
||||
gst_validate_printf (NULL,
|
||||
"\nAverage similarity: %f, min_avg: %f, min_min: %f\n",
|
||||
total_avg / nfiles, min_avg, min_min);
|
||||
}
|
||||
|
||||
done:
|
||||
gst_object_unref (file);
|
||||
|
|
Loading…
Reference in a new issue