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

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit 0f51d71abb881a938b0d4d6e7eb5869d2d1e7297
Author:     Martin Mirchev <[email protected]>
AuthorDate: Sun Oct 18 19:38:12 2026 +0800
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 06:17:20 2026 +0100

    avfilter/vf_fillborders: reject borders of half the frame in reflect mode
    
    Reflect mode mirrors around the edge pixel without repeating it, so a
    border of n lines reads lines up to 2 * n away from the edge. The
    borders were only checked against half the frame size, which is enough
    for mirror mode but not here: with bottom or right equal to half the
    height or width the filter read before the start of the plane, and with
    top or left equal to half it reflected lines outside the image.
    
    Signed-off-by: Martin Mirchev <[email protected]>
    (cherry picked from commit e196e57ca225a98654e482806fa714facd232b57)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_fillborders.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/vf_fillborders.c b/libavfilter/vf_fillborders.c
index 0ee4f14ab9..3ba009dae4 100644
--- a/libavfilter/vf_fillborders.c
+++ b/libavfilter/vf_fillborders.c
@@ -617,6 +617,14 @@ static int config_input(AVFilterLink *inlink)
         return AVERROR(EINVAL);
     }
 
+    /* reflect does not repeat the edge pixel, so it reads 2 * border + 1 
lines */
+    if (s->mode == FM_REFLECT &&
+        (inlink->w <= s->left * 2 || inlink->w <= s->right * 2 ||
+         inlink->h <= s->top  * 2 || inlink->h <= s->bottom * 2)) {
+        av_log(ctx, AV_LOG_ERROR, "Borders must be smaller than half the input 
frame size in reflect mode.\n");
+        return AVERROR(EINVAL);
+    }
+
     s->borders[0].left   = s->borders[3].left = s->left;
     s->borders[0].right  = s->borders[3].right = s->right;
     s->borders[0].top    = s->borders[3].top = s->top;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to