From 2d8c330f543397642fa1afe0a01a67155008d4e1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 9 Aug 2023 21:53:04 +0200 Subject: [PATCH 3/3] avfilter/af_adeclick: do not output pointless message Signed-off-by: Paul B Mahol --- libavfilter/af_adeclick.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c index fd0438d252..3401028c6b 100644 --- a/libavfilter/af_adeclick.c +++ b/libavfilter/af_adeclick.c @@ -721,9 +721,10 @@ static av_cold void uninit(AVFilterContext *ctx) { AudioDeclickContext *s = ctx->priv; - av_log(ctx, AV_LOG_INFO, "Detected %s in %"PRId64" of %"PRId64" samples (%g%%).\n", - filter_modes[s->mode], s->detected_errors, - s->nb_samples, 100. * s->detected_errors / s->nb_samples); + if (s->nb_samples > 0) + av_log(ctx, AV_LOG_INFO, "Detected %s in %"PRId64" of %"PRId64" samples (%g%%).\n", + filter_modes[s->mode], s->detected_errors, + s->nb_samples, 100. * s->detected_errors / s->nb_samples); av_audio_fifo_free(s->fifo); av_audio_fifo_free(s->efifo); -- 2.39.1