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 afad4e0..ade5667 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;