This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit e768ade128e67a559efe8ae6e4e74acd26209ffc Author: Ayoub Nabil Boubagrat <[email protected]> AuthorDate: Thu Aug 27 20:16:45 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Aug 31 13:42:52 2026 +0000 avfilter/adelay: parse fractional second delays correctly the initial integer scan stores '.' as the suffix for values such as 1.5s, causing them to be interpreted as milliseconds. inspect the actual final suffix instead. Signed-off-by: Ayoub Nabil Boubagrat <[email protected]> --- libavfilter/af_adelay.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c index c0d076fe64..4606e29c45 100644 --- a/libavfilter/af_adelay.c +++ b/libavfilter/af_adelay.c @@ -158,21 +158,27 @@ CHANGE_DELAY(dbl, double, 0) static int parse_delays(char *p, char **saveptr, int64_t *result, AVFilterContext *ctx, int sample_rate) { float delay, div; - int ret; char *arg; - char type = 0; + char suffix; if (!(arg = av_strtok(p, "|", saveptr))) return 1; - ret = av_sscanf(arg, "%"SCNd64"%c", result, &type); - if (ret != 2 || type != 'S') { - div = type == 's' ? 1.0 : 1000.0; + suffix = arg[strlen(arg) - 1]; + if (suffix != 'S') { + div = suffix == 's' ? 1.0 : 1000.0; if (av_sscanf(arg, "%f", &delay) != 1) { av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n"); return AVERROR(EINVAL); } *result = delay * sample_rate / div; + } else { + char type; + + if (av_sscanf(arg, "%"SCNd64"%c", result, &type) != 2 || type != 'S') { + av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n"); + return AVERROR(EINVAL); + } } if (*result < 0) { -- 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]
