avfilter: no need to request more samples if internal frame is available

release/7.0
Paul B Mahol 1 year ago
parent 66a02a8508
commit c979ccdfd7
  1. 2
      libavfilter/af_amultiply.c
  2. 2
      libavfilter/af_anlms.c
  3. 2
      libavfilter/af_arls.c
  4. 4
      libavfilter/af_asdr.c

@ -110,7 +110,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
if (s->frames[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;

@ -162,7 +162,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
if (s->frame[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;

@ -159,7 +159,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
if (s->frame[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;

@ -186,11 +186,11 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(outlink)) {
for (int i = 0; i < 2; i++) {
if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
if (s->cache[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;
}
return 0;
}
return FFERROR_NOT_READY;

Loading…
Cancel
Save