aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-05-17 09:02:11 +0200
committerPaul B Mahol <onemda@gmail.com>2023-05-18 12:06:38 +0200
commit01d9a84ef58c2d0d89958b18420483b058ac9dd1 (patch)
tree446e336364ca19fae55ca985360b8e0d85a6ce82
parentc48eff209ccd4ffc72a34dbbb9dd2be2fab4ded8 (diff)
downloadffmpeg-01d9a84ef58c2d0d89958b18420483b058ac9dd1.tar.gz
avfilter/avf_showspectrum: check for allocation error
-rw-r--r--libavfilter/avf_showspectrum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 4ce964706f..6c3d0e8c2b 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1292,6 +1292,8 @@ static int config_output(AVFilterLink *outlink)
av_realloc_f(s->combine_buffer, s->w * 4,
sizeof(*s->combine_buffer));
}
+ if (!s->combine_buffer)
+ return AVERROR(ENOMEM);
av_log(ctx, AV_LOG_VERBOSE, "s:%dx%d FFT window size:%d\n",
s->w, s->h, s->win_size);