[FFmpeg-cvslog] avfilter/af_astats: redo zero channel handling
Paul B Mahol
git at videolan.org
Sun Mar 8 12:08:24 CET 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Mar 8 11:06:45 2015 +0000| [0c49cff117bee5150d28eb215080f02aaacc8f9d] | committer: Paul B Mahol
avfilter/af_astats: redo zero channel handling
Suggested-by: Nicolas George
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c49cff117bee5150d28eb215080f02aaacc8f9d
---
libavfilter/af_astats.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index 3ac2749..c20f84d 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -222,9 +222,6 @@ static void print_stats(AVFilterContext *ctx)
av_log(ctx, AV_LOG_INFO, "Peak count: %"PRId64"\n", p->min_count + p->max_count);
}
- if (!nb_samples || !s->nb_channels)
- return;
-
av_log(ctx, AV_LOG_INFO, "Overall\n");
av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", max_sigma_x / (nb_samples / s->nb_channels));
av_log(ctx, AV_LOG_INFO, "Min level: %f\n", min);
@@ -243,7 +240,8 @@ static av_cold void uninit(AVFilterContext *ctx)
{
AudioStatsContext *s = ctx->priv;
- print_stats(ctx);
+ if (s->nb_channels)
+ print_stats(ctx);
av_freep(&s->chstats);
}
More information about the ffmpeg-cvslog
mailing list