[FFmpeg-cvslog] avfilter/avf_showfreqs: fix check for failed allocation

Paul B Mahol git at videolan.org
Sat Sep 21 20:09:56 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Sep 21 19:07:42 2019 +0200| [a46ee096d1a57cf7e00550681c5b477eeedf9eef] | committer: Paul B Mahol

avfilter/avf_showfreqs: fix check for failed allocation

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a46ee096d1a57cf7e00550681c5b477eeedf9eef
---

 libavfilter/avf_showfreqs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c
index 8755ac3a9e..c44ac564ac 100644
--- a/libavfilter/avf_showfreqs.c
+++ b/libavfilter/avf_showfreqs.c
@@ -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));



More information about the ffmpeg-cvslog mailing list