]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_tremolo.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / af_tremolo.c
index f55e8e2b09bfd2dd8def08295c2fe5c01e647fdf..8f9e3100409fb64b4a0599d223bb34fafc2d6552 100644 (file)
@@ -126,7 +126,7 @@ static int config_input(AVFilterLink *inlink)
     const double offset = 1. - s->depth / 2.;
     int i;
 
-    s->table_size = inlink->sample_rate / s->freq;
+    s->table_size = lrint(inlink->sample_rate / s->freq + 0.5);
     s->table = av_malloc_array(s->table_size, sizeof(*s->table));
     if (!s->table)
         return AVERROR(ENOMEM);
@@ -160,7 +160,7 @@ static const AVFilterPad avfilter_af_tremolo_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_af_tremolo = {
+const AVFilter ff_af_tremolo = {
     .name          = "tremolo",
     .description   = NULL_IF_CONFIG_SMALL("Apply tremolo effect."),
     .priv_size     = sizeof(TremoloContext),