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

Git pushed a commit to branch master
in repository ffmpeg.

commit 58cdd89789961fd56746375c58f5ab3b01509bad
Author:     Ramiro Polla <[email protected]>
AuthorDate: Sat Mar 7 20:06:21 2026 +0100
Commit:     Ramiro Polla <[email protected]>
CommitDate: Sat Mar 14 06:13:19 2026 +0000

    swscale/tests/swscale: allow passing -bench 0 to disable benchmarks
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Ramiro Polla <[email protected]>
---
 libswscale/tests/swscale.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index a6f0142a4e..ff4322512a 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -719,9 +719,14 @@ static int parse_options(int argc, char **argv, struct 
options *opts, FILE **fp)
                 return -1;
             }
         } else if (!strcmp(argv[i], "-bench")) {
-            opts->bench = 1;
-            opts->iters = atoi(argv[i + 1]);
-            opts->iters = FFMAX(opts->iters, 1);
+            int iters = atoi(argv[i + 1]);
+            if (iters <= 0) {
+                opts->bench = 0;
+                opts->iters = 1;
+            } else {
+                opts->bench = 1;
+                opts->iters = iters;
+            }
         } else if (!strcmp(argv[i], "-flags")) {
             SwsContext *dummy = sws_alloc_context();
             const AVOption *flags_opt = av_opt_find(dummy, "sws_flags", NULL, 
0, 0);

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

Reply via email to