From b5436f4b5dae7a664ba25a25b39640567f016348 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini <stefasab@gmail.com> Date: Tue, 6 Nov 2012 22:48:54 +0100 Subject: [PATCH] lavfi/showwaves: return error in case of allocation failure in filter_samples() --- libavfilter/avf_showwaves.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index e5263245f7f..50a114baed4 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -199,6 +199,8 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) showwaves->outpicref = outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN, outlink->w, outlink->h); + if (!outpicref) + return AVERROR(ENOMEM); outpicref->video->w = outlink->w; outpicref->video->h = outlink->h; outpicref->pts = insamples->pts + -- GitLab