[FFmpeg-devel] [PATCH v1] avfilter/vf_readeia608: fix check for failed av_calloc

lance.lmwang at gmail.com lance.lmwang at gmail.com
Mon Dec 23 06:55:58 EET 2019


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavfilter/vf_readeia608.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c
index ff096189a9..43c57268fa 100644
--- a/libavfilter/vf_readeia608.c
+++ b/libavfilter/vf_readeia608.c
@@ -121,7 +121,8 @@ static int config_input(AVFilterLink *inlink)
     s->signal = av_calloc(size, sizeof(*s->signal));
     s->code = av_calloc(size, sizeof(*s->code));
     s->temp = av_calloc(size, sizeof(*s->temp));
-    if (!s->temp)
+    if (!s->unfiltered || !s->filtered || !s->avg_filter ||
+        !s->std_filter || !s->signal || !s->code || !s->temp)
         return AVERROR(ENOMEM);
 
     return 0;
-- 
2.21.0



More information about the ffmpeg-devel mailing list