avfilter/signature_lookup: Fix 2 differences to the refernce SW

Fixes: CID1403227 Division or modulo by float zero

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 7 months ago
parent fb4a1eaadf
commit 25cb66369e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 4
      libavfilter/signature_lookup.c

@ -496,10 +496,10 @@ static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
continue; /* matching sequence is too short */
if ((double) goodfcount / (double) fcount < sc->thit)
continue;
if ((double) goodfcount*0.5 < FFMAX(gooda, goodb))
if ((double) goodfcount*0.5 <= FFMAX(gooda, goodb))
continue;
meandist = (double) goodfcount / (double) distsum;
meandist = (double) distsum / (double) goodfcount;
if (meandist < minmeandist ||
status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||

Loading…
Cancel
Save