summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showwaves.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-11-06 22:48:54 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-11-06 22:48:54 +0100
commitb5436f4b5dae7a664ba25a25b39640567f016348 (patch)
tree15903a03f1fbdb94ac33a89bff2fb0453a7e76eb /libavfilter/avf_showwaves.c
parent5f634480d1c4ed7711a15d1be07e49177cf351c1 (diff)
lavfi/showwaves: return error in case of allocation failure in filter_samples()
Diffstat (limited to 'libavfilter/avf_showwaves.c')
-rw-r--r--libavfilter/avf_showwaves.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index e5263245f7..50a114baed 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 +