From 73413e6bcab34ef8509a014403718237f0f8aa45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux@gmail.com>
Date: Mon, 13 Feb 2012 23:21:50 +0100
Subject: [PATCH] ffmpeg: raise ENOMEM on avfilter_graph_alloc() failure.

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

diff --git a/ffmpeg.c b/ffmpeg.c
index d1851e1589e..03bcccd81dd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -620,6 +620,8 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost)
     int ret;
 
     ost->graph = avfilter_graph_alloc();
+    if (!ost->graph)
+        return AVERROR(ENOMEM);
 
     if (ist->st->sample_aspect_ratio.num) {
         sample_aspect_ratio = ist->st->sample_aspect_ratio;
-- 
GitLab