diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-11-06 22:48:54 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-11-06 22:48:54 +0100 |
commit | b5436f4b5dae7a664ba25a25b39640567f016348 (patch) | |
tree | 15903a03f1fbdb94ac33a89bff2fb0453a7e76eb | |
parent | 5f634480d1c4ed7711a15d1be07e49177cf351c1 (diff) | |
download | ffmpeg-b5436f4b5dae7a664ba25a25b39640567f016348.tar.gz |
lavfi/showwaves: return error in case of allocation failure in filter_samples()
-rw-r--r-- | libavfilter/avf_showwaves.c | 2 |
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 + |