avfilter/af_astats: clear all stats
authorPaul B Mahol <onemda@gmail.com>
Wed, 24 Feb 2016 23:00:25 +0000 (00:00 +0100)
committerPaul B Mahol <onemda@gmail.com>
Wed, 24 Feb 2016 23:00:25 +0000 (00:00 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_astats.c

index 70ec28a..c8b034a 100644 (file)
@@ -98,7 +98,7 @@ static void reset_stats(AudioStatsContext *s)
 {
     int c;
 
-    memset(s->chstats, 0, sizeof(*s->chstats));
+    memset(s->chstats, 0, sizeof(*s->chstats) * s->nb_channels);
 
     for (c = 0; c < s->nb_channels; c++) {
         ChannelStats *p = &s->chstats[c];