]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/f_interleave: no need to check for inlink eof if non-empty queue
authorPaul B Mahol <onemda@gmail.com>
Sat, 25 Apr 2020 11:35:22 +0000 (13:35 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 25 Apr 2020 11:35:22 +0000 (13:35 +0200)
Also set state to ready if there is any inlink with queued frame.

libavfilter/f_interleave.c

index c231b307c1829506bca575c84d3e2d700c51fd5e..a18bbe79b3e5366a68eedf2ff219377b8b35606a 100644 (file)
@@ -70,11 +70,9 @@ static int activate(AVFilterContext *ctx)
     FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx);
 
     for (i = 0; i < ctx->nb_inputs; i++) {
-        if (!ff_outlink_get_status(ctx->inputs[i])) {
-            if (!ff_inlink_queued_frames(ctx->inputs[i]))
-                break;
-            nb_inputs_with_frames++;
-        }
+        if (!ff_inlink_queued_frames(ctx->inputs[i]))
+            continue;
+        nb_inputs_with_frames++;
     }
 
     if (nb_inputs_with_frames > 0) {
@@ -137,6 +135,11 @@ static int activate(AVFilterContext *ctx)
         }
     }
 
+    if (i) {
+        ff_filter_set_ready(ctx, 100);
+        return 0;
+    }
+
     return FFERROR_NOT_READY;
 }