]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_aiir: use correct size when allocating in zp2tf
authorPaul B Mahol <onemda@gmail.com>
Sat, 30 May 2020 08:55:28 +0000 (10:55 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 30 May 2020 16:04:14 +0000 (18:04 +0200)
libavfilter/af_aiir.c

index 214c998348c80e105ac84860af6dc2769703855b..9427d25b5017421db936773c535e4ee15269e2d3 100644 (file)
@@ -468,8 +468,8 @@ static int convert_zp2tf(AVFilterContext *ctx, int channels)
         IIRChannel *iir = &s->iir[ch];
         double *topc, *botc;
 
-        topc = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*topc));
-        botc = av_calloc((iir->nb_ab[1] + 1) * 2, sizeof(*botc));
+        topc = av_calloc((iir->nb_ab[1] + 1) * 2, sizeof(*topc));
+        botc = av_calloc((iir->nb_ab[0] + 1) * 2, sizeof(*botc));
         if (!topc || !botc) {
             ret = AVERROR(ENOMEM);
             goto fail;