avfilter/asrc_sinc: check allocation return value

release/5.1
Paul B Mahol 3 years ago
parent f4d123341c
commit 99f7f4144a
  1. 3
      libavfilter/asrc_sinc.c

@ -113,6 +113,9 @@ static float *make_lpf(int num_taps, float Fc, float beta, float rho,
float *h = av_calloc(num_taps, sizeof(*h)), sum = 0;
float mult = scale / bessel_I_0(beta), mult1 = 1.f / (.5f * m + rho);
if (!h)
return NULL;
av_assert0(Fc >= 0 && Fc <= 1);
for (i = 0; i <= m / 2; i++) {

Loading…
Cancel
Save