[FFmpeg-cvslog] lavfi/showwaves: return error in case of allocation failure in filter_samples()

Stefano Sabatini git at videolan.org
Tue Nov 6 22:50:30 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Nov  6 22:48:54 2012 +0100| [b5436f4b5dae7a664ba25a25b39640567f016348] | committer: Stefano Sabatini

lavfi/showwaves: return error in case of allocation failure in filter_samples()

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

 libavfilter/avf_showwaves.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index e526324..50a114b 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 +



More information about the ffmpeg-cvslog mailing list