From 4d84c7ded67141cdadaf052df01d9bd8940119ad Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 15 Apr 2012 15:46:37 +0200 Subject: [PATCH] yadif: fixed missing error handling for poll_frame. Signed-off-by: Michael Niedermayer --- libavfilter/vf_yadif.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 4ade615c4d..c31a283bad 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -314,11 +314,15 @@ static int poll_frame(AVFilterLink *link) return 1; val = avfilter_poll_frame(link->src->inputs[0]); + if (val <= 0) + return val; if (val >= 1 && !yadif->next) { //FIXME change API to not requre this red tape if ((ret = avfilter_request_frame(link->src->inputs[0])) < 0) return ret; val = avfilter_poll_frame(link->src->inputs[0]); + if (val <= 0) + return val; } assert(yadif->next || !val);