avfilter/af_astats: print stats in case nb_samples is 0

Happens with special function only.
This commit is contained in:
Paul B Mahol 2022-12-01 19:18:03 +01:00
parent f56454544f
commit 4d38d4607c
1 changed files with 2 additions and 2 deletions

View File

@ -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)