validate: ssim: Respect requested dump recurrence parameter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
This commit is contained in:
Philippe Normand 2022-03-02 10:54:17 +00:00
parent c275b5c678
commit 616d1dd6ba

View file

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