[FFmpeg-cvslog] avplay: Check memory allocation

Federico Tomassetti git at videolan.org
Sun Mar 22 04:01:11 CET 2015


ffmpeg | branch: master | Federico Tomassetti <federico at tomassetti.me> | Sat Mar 21 10:44:56 2015 +0000| [d450cb07d91ef39ad1d39bd7ca0cfce4bd7b13e7] | committer: Luca Barbato

avplay: Check memory allocation

Bug-Id: CID 1288294

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 avplay.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/avplay.c b/avplay.c
index b1ce057..e98e3ad 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1580,6 +1580,8 @@ static int video_thread(void *arg)
     AVFilterContext *filt_out = NULL, *filt_in = NULL;
     int last_w = is->video_st->codec->width;
     int last_h = is->video_st->codec->height;
+    if (!graph)
+        return AVERROR(ENOMEM);
 
     if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
         goto the_end;



More information about the ffmpeg-cvslog mailing list