[FFmpeg-cvslog] avfilter/af_astats: print stats in case nb_samples is 0
Paul B Mahol
git at videolan.org
Thu Dec 1 20:17:28 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Dec 1 19:18:03 2022 +0100| [4d38d4607cce5831918eca981972ed64740c9ee6] | committer: Paul B Mahol
avfilter/af_astats: print stats in case nb_samples is 0
Happens with special function only.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d38d4607cce5831918eca981972ed64740c9ee6
---
libavfilter/af_astats.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index 306a6603a2..724506df44 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -668,7 +668,7 @@ static void print_stats(AVFilterContext *ctx)
for (c = 0; c < s->nb_channels; c++) {
ChannelStats *p = &s->chstats[c];
- if (p->nb_samples == 0)
+ if (p->nb_samples == 0 && ctx->outputs[0]->sample_count_in == 0)
continue;
if (p->nb_samples < s->tc_samples)
@@ -757,7 +757,7 @@ static void print_stats(AVFilterContext *ctx)
av_log(ctx, AV_LOG_INFO, "Number of denormals: %"PRId64"\n", p->nb_denormals);
}
- if (nb_samples == 0)
+ if (nb_samples == 0 && ctx->outputs[0]->sample_count_in == 0)
return;
if (s->measure_overall != MEASURE_NONE)
More information about the ffmpeg-cvslog
mailing list