yadif: fixed missing error handling for poll_frame.
authorRobert Nagy <ronag89@gmail.com>
Sun, 15 Apr 2012 13:46:37 +0000 (15:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 15 Apr 2012 21:44:38 +0000 (23:44 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_yadif.c

index 4ade615..c31a283 100644 (file)
@@ -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);