diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2015-03-08 08:41:27 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-03-08 08:47:27 +0000 |
commit | 65ba90eac6fde92b078f8c012f591382b44ac88b (patch) | |
tree | a782f3885ad902f87905647a661c895940ed62c0 /libavfilter | |
parent | 9d7e42e65cfd8c521b1473b3ce1a11d73b6f56fb (diff) | |
download | ffmpeg-65ba90eac6fde92b078f8c012f591382b44ac88b.tar.gz |
avfilter/af_astats: Avoid Zero division in print part.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_astats.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 60ccd735e1..3ac27498bc 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -222,6 +222,9 @@ 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); |