ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Fri Dec 25 14:01:52 2020 +0100| [38e71d8b6c55f56ef58f1acb1c8d9e12a65e0a1d] | committer: Paul B Mahol
avfilter/af_tremolo: make sure table size is at least 1 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38e71d8b6c55f56ef58f1acb1c8d9e12a65e0a1d --- libavfilter/af_tremolo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c index f55e8e2b09..6baeb7f110 100644 --- a/libavfilter/af_tremolo.c +++ b/libavfilter/af_tremolo.c @@ -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); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".