lavfi/avf_concat: return immediately after requesting a frame on input.
authorNicolas George <george@nsup.org>
Fri, 23 Oct 2015 10:36:17 +0000 (12:36 +0200)
committerNicolas George <george@nsup.org>
Sat, 7 Nov 2015 15:43:36 +0000 (16:43 +0100)
libavfilter/avf_concat.c

index 5a4b356..4fa9447 100644 (file)
@@ -347,10 +347,9 @@ static int request_frame(AVFilterLink *outlink)
             if (cat->in[str].eof)
                 continue;
             ret = ff_request_frame(ctx->inputs[str]);
-            if (ret == AVERROR_EOF)
-                close_input(ctx, str);
-            else if (ret < 0)
+            if (ret != AVERROR_EOF)
                 return ret;
+            close_input(ctx, str);
         }
         ret = flush_segment(ctx);
         if (ret < 0)