avfilter/avf_showfreqs: fix check for failed allocation

This commit is contained in:
Paul B Mahol 2019-09-21 19:07:42 +02:00
parent 1c165e19f9
commit a46ee096d1

View File

@ -195,7 +195,7 @@ static int config_output(AVFilterLink *outlink)
if (!s->fft_data)
return AVERROR(ENOMEM);
s->avg_data = av_calloc(s->nb_channels, sizeof(*s->avg_data));
if (!s->fft_data)
if (!s->avg_data)
return AVERROR(ENOMEM);
for (i = 0; i < s->nb_channels; i++) {
s->fft_data[i] = av_calloc(s->win_size, sizeof(**s->fft_data));