avfilter/af_aspectralstats: request new frames only when needed

This commit is contained in:
Paul B Mahol 2022-04-30 15:38:38 +02:00
parent a9e9020ff6
commit 9aa20d28cd
1 changed files with 5 additions and 0 deletions

View File

@ -502,6 +502,11 @@ static int activate(AVFilterContext *ctx)
if (ret < 0)
return ret;
if (ff_inlink_queued_samples(inlink) >= s->hop_size) {
ff_filter_set_ready(ctx, 10);
return 0;
}
FF_FILTER_FORWARD_STATUS(inlink, outlink);
FF_FILTER_FORWARD_WANTED(outlink, inlink);