diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-12-01 19:18:03 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-12-01 19:21:11 +0100 |
commit | 4d38d4607cce5831918eca981972ed64740c9ee6 (patch) | |
tree | 6ec7b27011a088e8cd63774e3acce156fb644ae4 | |
parent | f56454544f35a3495310aa5ed4fb15e0ba7b967f (diff) | |
download | ffmpeg-4d38d4607cce5831918eca981972ed64740c9ee6.tar.gz |
avfilter/af_astats: print stats in case nb_samples is 0
Happens with special function only.
-rw-r--r-- | libavfilter/af_astats.c | 4 |
1 files 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) |