This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 200e0cba677b0d478576081ecf12af92b7a4a2d2
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Jun 6 21:02:16 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Jun 13 21:41:05 2026 +0000

    avfilter/estdif: avoid signed overflow in slice boundary calculation
    
    deinterlace_slice() computed per-thread row boundaries with int
    multiplication height * (jobnr + 1). With a tall frame and many filter
    threads the product overflows signed int before the division by nb_jobs.
    
    Use int64_t for the intermediate product before converting back to int
    row indices.
    
    Found-by: Kery (Qi Kery <[email protected]>)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_estdif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c
index b8289a6e96..6fdfe19e7e 100644
--- a/libavfilter/vf_estdif.c
+++ b/libavfilter/vf_estdif.c
@@ -354,8 +354,8 @@ static int deinterlace_slice(AVFilterContext *ctx, void 
*arg,
         const int height = s->planeheight[plane];
         const int src_linesize = in->linesize[plane];
         const int dst_linesize = out->linesize[plane];
-        const int start = (height * jobnr) / nb_jobs;
-        const int end = (height * (jobnr+1)) / nb_jobs;
+        const int start = (int)((int64_t)height * jobnr / nb_jobs);
+        const int end = (int)((int64_t)height * (jobnr + 1) / nb_jobs);
         const uint8_t *prev_line, *prev2_line, *next_line, *next2_line, 
*in_line;
         const uint8_t *prev3_line, *next3_line;
         uint8_t *out_line;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to