[FFmpeg-devel] [PATCH 2/3] avfilter/signature_lookup: Initialize bestmatch
Michael Niedermayer
michael at niedermayer.cc
Mon Apr 22 02:07:00 EEST 2024
Fixes: CID1500345 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavfilter/signature_lookup.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index a3086b38cca..dc0a2ef2b24 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -535,16 +535,14 @@ static MatchingInfo lookup_signatures(AVFilterContext *ctx, SignatureContext *sc
{
CoarseSignature *cs, *cs2;
MatchingInfo *infos;
- MatchingInfo bestmatch;
+ MatchingInfo bestmatch = {0};
MatchingInfo *i;
cs = first->coarsesiglist;
cs2 = second->coarsesiglist;
/* score of bestmatch is 0, if no match is found */
- bestmatch.score = 0;
bestmatch.meandist = 99999;
- bestmatch.whole = 0;
fill_l1distlut(sc->l1distlut);
--
2.25.1
More information about the ffmpeg-devel
mailing list