diff mbox series

[FFmpeg-devel] avfilter/vf_signature: Initialize all houghspace elements

Message ID 20210713075525.84497-1-me@jailuthra.in
State Accepted
Commit 012804d2e9087a65f557e18ef8171a5c6b779f6a
Headers show
Series [FFmpeg-devel] avfilter/vf_signature: Initialize all houghspace elements | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Jai Luthra July 13, 2021, 7:55 a.m. UTC
Co-authored-by: Oscar <oscar_davids@outlook.com>
---
The uninitialized score & dist values are used a few lines below this, leading 
to inconsistent mpeg7 matches.
Original PR here: https://github.com/livepeer/FFmpeg/pull/4

 libavfilter/signature_lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jai Luthra July 19, 2021, 10:21 a.m. UTC | #1
Planning to push it in 24h - if there are no objections.
diff mbox series

Patch

diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index 272c717c77..f1d378237a 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -200,7 +200,7 @@  static MatchingInfo* get_matching_parameters(AVFilterContext *ctx, SignatureCont
     /* initialize houghspace */
     for (i = 0; i < MAX_FRAMERATE; i++) {
         hspace[i] = av_malloc_array(2 * HOUGH_MAX_OFFSET + 1, sizeof(hspace_elem));
-        for (j = 0; j < HOUGH_MAX_OFFSET; j++) {
+        for (j = 0; j < 2 * HOUGH_MAX_OFFSET + 1; j++) {
             hspace[i][j].score = 0;
             hspace[i][j].dist = 99999;
         }