[FFmpeg-cvslog] avfilter/af_adeclick: stop outputing pointless message

Paul B Mahol git at videolan.org
Sat Aug 12 01:29:26 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Aug 12 00:26:50 2023 +0200| [3e04f5357100346dd42c979d3ebcbc69d3c8d2a8] | committer: Paul B Mahol

avfilter/af_adeclick: stop outputing pointless message

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e04f5357100346dd42c979d3ebcbc69d3c8d2a8
---

 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 328c347b36..fad6bc5913 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -734,9 +734,10 @@ static av_cold void uninit(AVFilterContext *ctx)
     AudioDeclickContext *s = ctx->priv;
     int i;
 
-    av_log(ctx, AV_LOG_INFO, "Detected %s in %"PRId64" of %"PRId64" samples (%g%%).\n",
-           s->is_declip ? "clips" : "clicks", 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",
+               s->is_declip ? "clips" : "clicks", 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);



More information about the ffmpeg-cvslog mailing list