validate: ssim: Respect requested dump recurrence parameter
authorPhilippe Normand <philn@igalia.com>
Wed, 2 Mar 2022 10:54:17 +0000 (10:54 +0000)
committerPhilippe Normand <philn@igalia.com>
Thu, 17 Mar 2022 14:48:34 +0000 (14:48 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>

subprojects/gst-devtools/validate/plugins/ssim/gstvalidatessim.c

index afad4e0d1d9e85dbe9b4b62d76af72516bb0128f..ade5667a263e1b3f597cfe1cf1be56afdf15a2b6 100644 (file)
@@ -583,8 +583,7 @@ _should_dump_buffer (ValidateSsimOverride * self,
   if (priv->recurrence == 0)
     return FALSE;
 
-  if (position > priv->last_dump_position ?
-      position - priv->last_dump_position : 0 >= priv->recurrence)
+  if (GST_CLOCK_DIFF (priv->last_dump_position, position) >= priv->recurrence)
     return TRUE;
 
   return FALSE;