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 d33c99f2e9c8a64ff46976b30e9f665a9674db53
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 23:33:29 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 04:36:59 2026 +0100

    avfilter/af_surround: apply a new overlap before taking the next frame
    
    Fixes: negative size memset
    Fixes: 1qnBq4rDE31l
    
    Found during the triage of a finding from the review of 
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25800
    
    Negative size memset Replicated through UnModified FFmpeg with ASAN
    
    (cherry picked from commit 8716f3fe9e2bc3fb10b9f41a9ee1e1048d8ae036)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/af_surround.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index 4e23e422ff..455d5dbe10 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -1353,6 +1353,7 @@ static int activate(AVFilterContext *ctx)
 
     FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);
 
+    s->hop_size = FFMAX(1, s->win_size * (1. - s->overlap));
     ret = ff_inlink_consume_samples(inlink, s->hop_size, s->hop_size, &in);
     if (ret < 0)
         return ret;
@@ -1416,15 +1417,12 @@ static av_cold void uninit(AVFilterContext *ctx)
 static int process_command(AVFilterContext *ctx, const char *cmd, const char 
*args,
                            char *res, int res_len, int flags)
 {
-    AudioSurroundContext *s = ctx->priv;
     int ret;
 
     ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
     if (ret < 0)
         return ret;
 
-    s->hop_size = FFMAX(1, s->win_size * (1. - s->overlap));
-
     allchannels_spread(ctx);
     set_input_levels(ctx);
     set_output_levels(ctx);

-- 
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