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)
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;